write a program to accept two number and find out the largest among them

two number largest,

 /*write a program to accept two number and find out the largest among them*/

#include<stdio.h>

#include<conio.h>

void main()

{                int a,b;

                 clrscr();

                 printf(" \n Enter two number =");

                 scanf("%d%d",&a,&b);

                if(a==b)

                      printf("\n Both are equal ");

                elseif(a>b)

                       printf("\n %dis largest ",a);

                else

                       printf("\n %dis largest ",b);

                getch();

}


/* Output :---

                   Enter two number =  20

                                                     30

                    20 is largest.

                    OR

                   Enter two number =  20

                                                     20

                   Both are equal

*/                                                                      👇😊💬💭👌

No comments:

Post a Comment

This Blog helps you to learn basics to high level programming coding and practicals.
conceptual understanding

c program, Advance coding, c++ program, simple program, Advance language

online quiz Application project page MCA final year project

  Here we making a quiz application ppt presentation for college project so that our project idea will like to our professor and teacher  fi...