I am going to write a program by which You can check greatest between two numbers
void main()
{
int a,b,c;
clrscr();
printf("Enter First Number::");
scanf("%d",&a);
printf("Enter Second Number::");
scanf("%d",&b);
c=a>b?a:b;
printf("Greatest number is::%d",c);
getch();
}
void main()
{
int a,b,c;
clrscr();
printf("Enter First Number::");
scanf("%d",&a);
printf("Enter Second Number::");
scanf("%d",&b);
c=a>b?a:b;
printf("Greatest number is::%d",c);
getch();
}
No comments:
Post a Comment