google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 Write a c program to find the largest of three numbers or Write a c program largest among three numbers or C Program for largest of 3 numbers. - 2nd puc computer science

Write a c program to find the largest of three numbers or Write a c program largest among three numbers or C Program for largest of 3 numbers.

 Write a c program to find the largest of three numbers or Write a c program largest among three numbers or C Program for largest of 3 numbers.

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

printf("Enter three numbers\n");

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

if(a>b)

if(a>c)

         printf("%d is the greatest",a);

else

         printf("%d is the greatest",c);

else if(b>c)

         printf("%d is the greatest",b);

else

         printf("%d is the greatest",c);

getch();

}

Output:

Enter three numbers

3                                                                              

4                                                                              

5                                                                              

5 is the greatest               

Write a c program to find the largest of three numbers or Write a c program largest among three numbers or C Program for largest of 3 numbers.  Write a c program to find the largest of three numbers or Write a c program largest among three numbers or C Program for largest of 3 numbers. Reviewed by Vision Academy on December 08, 2021 Rating: 5

No comments:

CheckOut

Powered by Blogger.