Search
 
SCRIPT & CODE EXAMPLE
 

C

find the largest number among five numbers in c language

#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 largest", a); 
 
 else 
  if(b>c && b>d && b>e) 
   printf("%d is largest", b); 
 
 else 
  if(c>d && c>e) 
   printf("%d is largest", c); 
 
 else 
  if(d>e) 
   printf("%d  is largest", d); 
 
 else 
  printf("%d is largest", e); 
  
 return 0; 
}
Comment

PREVIOUS NEXT
Code Example
C :: cannot get / react router dom 
C :: libdvd-pkg: `apt-get check` failed 
C :: how to read character from a string in c 
C :: print 0 1 2 3 4 in c 
C :: how to mutex lock in c 
C :: A binary tree whose every node has either zero or two children is called 
C :: count number of vowels in a string in c 
C :: c float to string 
C :: hi servicenow 
C :: tkinter create_line 
C :: c execute shell command 
C :: string input c 
C :: sum average min max in c array 
C :: goto statement in c 
C :: print short in c 
C :: c convert char to int 
C :: read from stdin c 
C :: enum in c 
C :: loading builder in flutter 
C :: form controls in bootsrap 
C :: solana-test-validator log 
C :: selection sort c 
C :: how to take comma separated integer input in c 
C :: terraform fargate cpu 
C :: declaration in c 
C :: yum install supervisor amazon linux 
C :: while loop in c 
C :: check command line input is a number in c 
C :: typedef c 
C :: columntransformer in randomizedsearchcv 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =