Skip to content

Commit f0a20cb

Browse files
committed
C_Tut_15
Even moar math
1 parent ab4c4b5 commit f0a20cb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

C/15_cProgramming.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
// Even moar math.
3+
4+
#include <stdio.h>
5+
#include <stdlib.h>
6+
7+
8+
int main()
9+
{
10+
11+
int pageViews = 0;
12+
13+
pageViews = pageViews + 1;
14+
printf("Page views: %d \n", pageViews);
15+
pageViews = pageViews + 1;
16+
printf("Page views: %d \n", pageViews);
17+
pageViews = pageViews + 1;
18+
printf("Page views: %d \n", pageViews);
19+
20+
float balance = 1000.00;
21+
22+
balance *= 1.1;
23+
printf("Balance: %f \n", balance);
24+
balance *= 1.1;
25+
printf("Balance: %f \n", balance);
26+
balance *= 1.1;
27+
printf("Balance: %f \n", balance);
28+
29+
return 0;
30+
}

0 commit comments

Comments
 (0)