'C' program to find maximum of two numbers.
C File =>
/* Write a ‘C’ program to find maximum of two numbers. */
#include<stdio.h>
int main()
{
int a,b;
printf("\n Enter number1 : ");
scanf("%d",&a);
printf("\n Enter number2 : ");
scanf("%d",&b);
if(a>b)
printf("\n Maximum of number is : %d",a);
else
printf("\n Maximum of number is : %d",b);
return 0;
}
#include<stdio.h>
int main()
{
int a,b;
printf("\n Enter number1 : ");
scanf("%d",&a);
printf("\n Enter number2 : ");
scanf("%d",&b);
if(a>b)
printf("\n Maximum of number is : %d",a);
else
printf("\n Maximum of number is : %d",b);
return 0;
}
Comments
Post a Comment
Please do not enter any spam link in message.