C Programs 1
C Programs 1
Flowchart :
Sample Solution :-
Flowchart :
Sample Solution :-
C Code :
#include <stdio.h>
void main()
{
int vote_age;
Sample Solution :-
C Code:
#include <stdio.h>
void main()
{
int m,n;
printf("Input the value of m :");
scanf("%d",&m);
if(m!=0)
if(m>0)
n=1;
else
n=-1;
else
n=0;
printf("The value of m = %d \n",m);
printf("The value of n = %d \n",n);
}
Flowchart :
Sample Solution :-
C Code:
#include <stdio.h>
void main()
{
float PerHeight;
Flowchart :
C Conditional Statement: Exercise-8 with Solution
Write a C program to find the largest of three numbers.
Test Data :
12 25 52
Expected Output :
1st Number = 12, 2nd Number = 25, 3rd Number = 52
The 3rd Number is the greatest among three
Sample Solution :-
C Code:
#include <stdio.h>
void main()
{
int num1, num2, num3;
OR
#include <stdio.h>
void main() {
int num1, num2, num3;
OR
#include <stdio.h>
void main() {
int num1, num2, num3,ctr;