Answer to Question #28241 in C++ for Max Lek
Using an if-else statement, kindly HELP write down a C code that will assign the maximum of a and b to an integer variable called Max
1
2013-04-16T09:31:38-0400
#include<stdio.h>
int main()
{
printf("Input a : ");
int a;
scanf("%d",&a);
printf("Input b : ");
int b;
scanf("%d",&b);
int max;
if(a > b)
& max = a;
else
& max = b;
printf("max = %d",max);&
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment