Step 1: Start
Step 2: Input value of a,b,c
Step 3: If a > b then
Assign a to max
Otherwise
Assign b to max
Step 4: If c > maximum then
Assign c to max
Step 5: Display max
Step 6: Stop
Flowchart:
Program:
#include<stdio.h>
int main()
{
int a,b,c,max;
printf("\n Enter three numbers ");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{
max=a;
}
else
{
max=b;
}
if(c>max)
{
max=c;
}
printf("\n greater number is %d \n", max);
return (0);
}
printf("\n greater number is %d \n", max);
return (0);
}
Output:
Enter three numbers 2 3 4
greater number is 4