C Program to Find Greater of Two Entered Numbers

0
6
digitalample eye
Write a c program to with declaring integer variable a, b, c, d, e, f; and make three segments of these six variables to take input and find the greater number among two combinations.

Write a program to find greater of two numbers.

C Code

#include <stdio.h>
#include <conio.h>
void main()
{
int a, b, c, d, e,f;

printf("nenter two numbers;");
scanf("%d%d",&a, &b);

if(a>b)
printf("n greater number is : %d",a);
else
printf("n greater number is %d",b);

printf("nenter two numbers:");
scanf("%d%d",&c, &d);

if(c>d)
printf("n greater number is : %d",c);
else
printf("n greater number is %d",d);

printf("nenter two numbers:");
scanf("%d%d",&e,&f);

if(e>f)
printf("ngreater number is : %d",e);
else
printf("n greater number is : %d",f);

getch();
}

Output

find greater number

LEAVE A REPLY

Please enter your comment!
Please enter your name here