64 671
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #28241 in C++ for Max Lek

Question #28241
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
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions