Yashuop
May 14, 2022

Write a program to compare two integer numbers using if-else statement

// write a program to compare 2 int nos using if-else statement #include<stdio.h> #include<conio.h> void main() { int a,b; //clrscr(); printf("Input the value of a:"); scanf("%d",&a); print("Input the value of b:"); scanf("%d",&b); if(a!=b) { printf("a is not equal to b\n"); if (a.b) {printf("a is greaterrrr thannn b\n");} else {printf("b is greater thana\n");} } else {printf("a is equal to b\\n"); }

Screenshot (13).png

yashuop

yashuop

explorer

Leave a Reply

Related Posts

Categories