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

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

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

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,large;

clrscr();

printf("Enter two numbers\n");

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

large=a;

if(b>large)

large=b;

printf("Largest number is %d",large);

getch();

}

Output:

Enter two numbers

5                                                                              

6                                                                              

Largest number is 6          

Write a c program to find the largest of two numbers or program to find greatest of two numbers in c.  Write a c program to find the largest of two numbers or program to find greatest of two numbers in c. Reviewed by Vision Academy on December 07, 2021 Rating: 5

No comments:

CheckOut

Powered by Blogger.