-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelse_if_statement.c
More file actions
23 lines (22 loc) · 913 Bytes
/
Copy pathelse_if_statement.c
File metadata and controls
23 lines (22 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//if else-if else statements writen in this code
void main(){
int a,b;
printf("Enter A value :"); //asking to user as a enter a value in integer
scanf("%d", &a); //input value's taken from user
printf("Enter B value :"); //asking to user as a enter a value in integer
scanf("%d", &b); //input value's taken from user
if( a > b){ //start the if block and assine the condition
printf("A grater the B"); // condition output
}
else if(a < b){ //else-if block started and given the condition assined
printf("A lesser the B"); // condition output
}
else{ //else output else is not containg the condition block
printf("A and B both are same value's"); // else output
}
}
//thank you dear if any mistakes please ping me i want to learn some more logics in c lang