Nitin400

A program to find the largest number among three numbers ent

Jun 12th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int x,y,z;
  5.     printf("Enter the largest number:\n");
  6.     scanf("%d%d%d",&x,&y,&z);
  7.     if(x>y && x>z)
  8.     printf("The largest number is %d",x);
  9.     else if(y>z && y>z)
  10.     printf("The largest number is %d",y);
  11.     else
  12.     printf("The largest number is %d",z);
  13. }
Add Comment
Please, Sign In to add comment