Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  max of 3 values
Language: C/C++
Code:
#include <stdio.h>
int main()
{
     int a,b,c;
     printf("enter 3 values:");
     scanf("%d%d%d",&a,&b,&c);
     printf("the max value is:");
     if(a>b)
        if(a>c)
          printf("%d",a);
        else
          printf("%d",c);
     else
        if(c>b)
          printf("%d",c);
        else
          printf("%d",b);
     return 0;
}
          
          
          
          
Comments: