C Program to Find Greater of Two Entered Numbers

C Program to Find Greater of Two Entered Numbers, Write a program to find greater of two numbers. , declaring integer variable a, b, c, d, e, f;

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

You May Also Like...

Socialize with Us