Tag Archives: Find Largest number using conditional operator ternary operator

Find Largest of Two Numbers Ternary Operator

Find Largest of Two Numbers Ternary Operator #include<stdio.h> int main() { int num1, num2; printf(“Enter First Number=”); scanf(“%d”, &num1); printf(“Enter 2nd Number=”); scanf(“%d”, &num2); if(num1 == num2) printf(“First Number %d is equal to Second Number %d “, num1,num2); else printf(“First Number %d is not equal to Second Number %d “, num1,num2); return 0; } Output:… Read More »

Loading