#include<stdio.h>
void main()
{
int a,b;
printf("enter two number");
scanf("%d%d",&a,&b);
{
if(a>b)
printf("a is big");
}
else
printf("b is big");
getch();
}
Chat with our AI personalities
Algorithm Step1: Read A, B, C Step2: If A > B is True, then check whether A > C, if yes then A is greatest otherwise C is greatest Step3: If A > B is False, then check whether B > C, if yes then B is greatest otherwise C is greatest Give the Flowchart Answer
draw a flowchart to find the biggest number among the 3 numbers
identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a > b and a > c display a "is greatest" else if b > c display b "is greatest" else display c "is greatest". display " thank you". stop run.
To find greatest of 3 digits in one line #includ<stdio.h> #include<conio.h> void main() { int a,b,c; printf("enter a,b,c:); scanf("d%d%d",&a,&b,&c); printf("greatest no: %d"(a>b)?((a>c)?a:c):((c>b)?c:b)); printf("have a nice day"); getch(); }
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?