Greater Number

  • Uploaded by: Muhammad Rana Farhan
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Greater Number as PDF for free.

More details

  • Words: 150
  • Pages: 1
Intermediate Part II Problem: Take three numbers from user and print the greater number e.g. No1 is 12, No2 is 26, No3 is 92. Output: No3 is greater which is 92. #include #include <stdio.h> void main() { clrscr(); int no1,no2,no3; printf("Enter the 1st no: "); scanf("%d",&no1); printf("Enter the 2nd no: "); scanf("%d",&no2); printf("Enter the 3rd no: "); scanf("%d",&no3); if(no1==no2&&no1==no3) printf("\n All Numbers are Equal"); else if(no1>no2&&no1>no3) printf("\n 1st Number is greater which is: %d",no1); else if(no2>no1&&no2>no3) printf("\n 2nd Number is greater which is: %d",no2); else if(no3>no1&&no3>no2) printf("\n 3rd Number is greater which is: %d",no3); else if(no1==no2&&no1>no3) printf("\n 1st and 2nd numbers are Equal but Greator than 3rd"); else if(no1==no3&&no1>no2) printf("\n 1st and 3rd numbers are Equal but Greator than 2nd"); else if(no2==no3&&no2>no1) printf("\n 2nd and 3rd numbers are Equal but Greator than 1st"); getch(); } Click the link below to see more examples URL: http://ravianeducation.blogspot.com E-Mail: [email protected] Farhan: 03008855006

Related Documents

Greater Number
June 2020 14
Greater
June 2020 28
Number
October 2019 43
Number
October 2019 49
Greater India
October 2019 23
Greater Noida
December 2019 25

More Documents from ""

Factorial
June 2020 13
Lecture 10
June 2020 19
Scientific Calculator
June 2020 8
Intermediate Part Ii
June 2020 9
Intermediate Part Ii
June 2020 6