Feed Headline Animator

Input two values use conditional operator to find out which value is greater. Print a message on the screen to indicate the greater value

Main( )
{
int r,b,max;
clrscr();
printf(“Enter 1st value\n”);
scanf(“%d”,&r);
printf(“Enter 2nd value\n”);
scanf(“%d”,&b);
max=(r>b)? r;b;
printf(“Greater value is =%d\n”,max);
getch();
}

Posted by: Wasim Javed

No comments:

Post a Comment