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

Write a program to find the greatest of two numbers

Write a program to find the greatest of two numbers

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b;

clrscr();

printf("Enter two numbers\n");

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

if(a>b)

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

else

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

getch();

}

Output:

Enter two numbers

7                                                                              

8                                                                              

8 is greatest               

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

No comments:

CheckOut

Powered by Blogger.