Find maximum of two numbers

Program:

#include<stdio.h>
int main()
{
int x,y;
printf("Enter two numbers: \n");
scanf("%d %d",&x,&y);
if(x>y)
{
printf("%d is maximum",x);
}
else
{
printf("%d is maximum",y);
}
return 0;

}

Output:



No comments:

Post a Comment

x^y using recursion

Program: #include<stdio.h> int power(int a,int b); int main() { int x,y,ans; printf("Enter x and y:\n "); scanf(...