Write a program to input two number and find highest number.

In this program we input two number and check which number is highest. For this, we give a condition As:- If 1st number is highest then print 1st number else 2nd number is highest and print 2nd number.


#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter 1st number=");
scanf("%d",&a);
printf("Enter 2nd number=");
scanf("%d",&b);
if(a>b)
printf("\n1st number is highest");
else
printf("\n2nd number is highest");
getch();
}

OUTPUT 

Enter 1st number=9
Enter 2nd number =7

1st number is highest

Related Examples 

  1. Write a program to input a number and check number is positive or not.
  2. Write a program to input a number and check number is negative or not. 
  3. Write a program to input a number and check number is positive,negative or nuteral. 

Follow for recently updates ,Share and Comment. 

Comments

Popular posts from this blog

Write a program to input age of any person and check he is eligible for voting or not.

Write a program to input two digit number and check number is palindrome or not.

Write a program to input speed of Royal Enfield and check it's running at economic speed or not.