MaximumNo2

This commit is contained in:
2021-04-27 09:28:32 +05:30
parent dc7cdddc8c
commit b64a909782
3 changed files with 24 additions and 1 deletions

22
MaximumNo2.c Normal file
View File

@@ -0,0 +1,22 @@
// WAP to find out maximum out of two numbers.
void main() {
int num1, num2;
printf("Enter two numbers: ");
scanf("%d%d", &num1, &num2);
if(num1 > num2) {
printf("%d is maximum", num1);
}
else if(num2 > num1) {
printf("%d is maximum", num2);
}
else if(num1 == num2) {
printf("Both are equal");
}
else {
printf("Error: Invalid Input");
}
}

BIN
MaximumNo2.exe Normal file

Binary file not shown.

View File

@@ -14,3 +14,4 @@
|12 | SolveExpression2.c | SolveExpression2.exe | WAP to solve given expression "ans=a + b - (c*d) / f + g" | |12 | SolveExpression2.c | SolveExpression2.exe | WAP to solve given expression "ans=a + b - (c*d) / f + g" |
|13 | SolveExpression3.c | SolveExpression3.exe | WAP to solve given expression "ans = a / (a+b) - [ d * e / (f*g)]" | |13 | SolveExpression3.c | SolveExpression3.exe | WAP to solve given expression "ans = a / (a+b) - [ d * e / (f*g)]" |
|14 | AgeCheck.c | AgeCheck.exe | WAP to check your age > 18 or not (using if else statement) | |14 | AgeCheck.c | AgeCheck.exe | WAP to check your age > 18 or not (using if else statement) |
|15 | MaximumNo2.c | MaximumNo2.exe | WAP to find out maximum out of two numbers |