“Corong_exerciseno3” Code-Antworten

Corong_exerciseno3

write a program that will input five (5) numbers display the highest number
Keir Jaspher Corong

Corong_exerciseno3

#include<stdio.h>

int main()
{
  int A,B,C,D,E;
  
  printf("ENTER THE FIVE NUMBERS");
  scanf("%d %d %d %d %d",&A,&B,&C,&D,&E);
  
  if(A>B && A>C && A>D && A>E)
    printf("%d is largets",A);
  
  else
    if(B>A && B>C && B>D && B>E)
      printf("%d is largest",B);
  
  else
    if(C>A && C>B && C>D && C>E)
      printf("%d is largest",C);
  
  else
    if(D>A && D>B && D>C && D>E)
      printf("%d is largest",D);
  
  else
    if(E>A && E>B && E>C && E>D)
      printf("%d is largest",E)"
      
      return 0;
}
Keir Jaspher Corong

Ähnliche Antworten wie “Corong_exerciseno3”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen