google.com, pub-6167773875660516, DIRECT, f08c47fec0942fa0 Write a c program to find the largest of two numbers - 2nd puc computer science

Write a c program to find the largest of two numbers

Write a c program to find the greatest of two numbers

Write a program to find the largest of two numbers in c

#include<stdio.h>

#include<conio.h>

void main()

{

int large(int,int); //function prototype

int a,b;

clrscr();

printf("Enter two numbers:\n");

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

printf("The largest number is %d",large(a,b));

getch();

}

int large(int x, int y)

{

if(x>y)

return(x);

else

return(y);

}

Output:

Enter two numbers:

50                                                                             

51                                                                             

The largest number is 51                                                        


Write a c program to find the largest of two numbers Write a c program to find the largest of two numbers Reviewed by Vision Academy on December 13, 2021 Rating: 5

No comments:

CheckOut

Powered by Blogger.