-
Notifications
You must be signed in to change notification settings - Fork 3
/
limits.c
executable file
·53 lines (30 loc) · 1.76 KB
/
limits.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/** limits.c
* =============================================================
* Name: Your Name, Date
* Section: Your Section
* Project: Lab 04
* Purpose: Determine the max and min values of ints and longs
* ============================================================= */
#include <stdio.h>
#include <limits.h>
#define WORLD_POPULATION_2020 7794798739
int main() {
// Task 1 -----------------------------------------------------------------------
// Create an integer variable, and assign it the value of the world population
// Print out the integer variable you just made
// Create a long variable, and assign it the value of the world population
// Print out the long variable you just made
// Task 2 -----------------------------------------------------------------------
// Create an integer variable, and assign it the value of INT_MAX - 1
// Print the value of the variable you just made
// Increment the value of your integer variable, and print it out using the same format as above
// Increment the value of your integer variable, and print it out using the same format as above
// Increment the value of your integer variable, and print it out using the same format as above
// Task 3 -----------------------------------------------------------------------
// Create an long variable, and assign it the value of LONG_MAX - 1
// Print the value of the variable you just made
// Increment the value of your long variable, and print it out using the same format as above
// Increment the value of your long variable, and print it out using the same format as above
// Increment the value of your long variable, and print it out using the same format as above
return 0;
}