google-site-verification: googlef8aa845b858144d3.html COMPUTER SCIENCE NOTES: Largest: (Example 1)C Program to Find the Largest Number Among Three Num...

Friday, March 3, 2017

Largest: (Example 1)C Program to Find the Largest Number Among Three Num...

/*find the largest number from give 3 numbers */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter 3 numbers a,b and c:\n");
scanf("%d %d %d",&a,&b,&c);
printf("largest number is : %d",(a>b?(a>c?a:c):(b>c?b:c)));
getch();
}

//thanx



No comments:

Post a Comment