We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
0 parents commit 0668418Copy full SHA for 0668418
if else statement
@@ -0,0 +1,34 @@
1
+/* Humza Khawar
2
+
3
+ IF..ELSE
4
+ */
5
6
+#include<stdio.h>
7
8
+int main()
9
+{
10
+ // variable declaration & initialization
11
+ int j = 4;
12
+ int k;
13
+ k = j * 4 % 5;
14
+ int min = k;
15
16
+ //checking greater number
17
18
+ if (j < k)
19
+ {
20
+ //if j is less than k
21
+ min = j;
22
+ printf("j is smaller than k\n");
23
+ }
24
+ else
25
+ //if k is less than j
26
+ printf("j is larger than or equal to k \n");
27
28
+ //final print statement to print minimum number
29
+ printf("min = %d \n", min);
30
+ return 0;
31
32
+ getchar();
33
34
+}
0 commit comments