We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22b27d5 commit ed9d080Copy full SHA for ed9d080
0x03-debugging/0-positive_or_negative.c
@@ -0,0 +1,33 @@
1
+#include <stdlib.h>
2
+#include <time.h>
3
+#include <stdio.h>
4
+
5
+/**
6
+ * main - Entry of the program
7
+ * Return: Always return (0)
8
+ **/
9
10
+int main(void)
11
+{
12
+ int n;
13
14
+ srand(time(0));
15
+ n = rand() - RAND_MAX / 2;
16
17
+ if (n < 0)
18
+ {
19
+ printf("%i is negative\n", n);
20
+ }
21
+ else
22
23
+ if (n > 0)
24
25
+ printf("%i is positive\n", n);
26
27
28
29
+ printf("%i is zero\n", n);
30
31
32
+ return (0);
33
+}
0x03-debugging/main.c
0 commit comments