1.Write a program to find greatest number from two numbers.
#include<stdio.h>
void main()
{
int a=10,b=5;
if(a>b)
{
printf("a is greater number.");
}
else
{
printf("b is greater number.");
}
}
Output:
a is greater number.
#include<stdio.h>
void main()
{
int a=10,b=5;
if(a>b)
{
printf("a is greater number.");
}
else
{
printf("b is greater number.");
}
}
Output:
a is greater number.
No comments:
Post a Comment