MAXIMUM OF 3 in C Programming

Image result for c programming

MAXIMUM OF 3 in C Programming
Code:
  #include<stdio.h>
int main(){
  int a,b,c;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  if(a>=b)
  {
    if(a>=c)
      printf("%d is the maximum number",a);
    else
      printf("%d is the maximum number",c);
  }
  else if(b>=c)
    printf("%d is the maximun number",b);
    else
      printf("%d is the maximum number",c);
 
  return 0;
}

No comments