Write a program to find maximum between three numbers

#include<stdio.h>
void main()
{
  int a,b,c;
  printf("Enter three numbers: ");
  scanf("%d %d %d",&a, &b, &c);
  
  if(a>b && a>c) 
    printf("\nlargest no.=%d",a);
 else if(b>a && b>c) 
    printf("\nlargest no.=%d",b);
 else
   printf("\nlargest no.=%d",c);
    

Post a Comment

0 Comments