added programs
This commit is contained in:
20
programs/p311/main.c
Normal file
20
programs/p311/main.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
int a, b;
|
||||
|
||||
printf("Int A: ");
|
||||
scanf("%d", &a);
|
||||
printf("Int B: ");
|
||||
scanf("%d", &b);
|
||||
|
||||
int diff = a - b;
|
||||
|
||||
if (diff >= 11 || diff <= -11) {
|
||||
printf("Difference is greater than or equal to 11.\n");
|
||||
} else {
|
||||
printf("Difference is less than or equal to 10.\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user