programming:c:hello_world
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
programming:c:hello_world [2014/12/11 16:10] – czuber | programming:c:hello_world [2014/12/11 16:22] (current) – czuber | ||
---|---|---|---|
Line 127: | Line 127: | ||
</ | </ | ||
* Then run your programm by typing " | * Then run your programm by typing " | ||
+ | ===== Exercice 5 : for in for ===== | ||
+ | |||
+ | * Open a terminal | ||
+ | * Create your file by writing the following command | ||
+ | <code c> | ||
+ | vim ex5.c | ||
+ | </ | ||
+ | * Enter insertion mode by pressing Insert | ||
+ | * Write the lines below | ||
+ | <code c> | ||
+ | # | ||
+ | |||
+ | int main(int argc, char** argv) | ||
+ | { | ||
+ | int i = 1; | ||
+ | int j = 1; | ||
+ | int nbrMax = 10; | ||
+ | for(i=1; | ||
+ | { | ||
+ | for(j=1; | ||
+ | { | ||
+ | printf(" | ||
+ | } | ||
+ | printf(" | ||
+ | } | ||
+ | |||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
+ | * Then press Esc key | ||
+ | * Write :wq | ||
+ | * Compile your code with the following line | ||
+ | < | ||
+ | gcc -Wall ex5.c -o ex5 | ||
+ | </ | ||
+ | * Then run your programm by typing " |
programming/c/hello_world.1418314234.txt.gz · Last modified: 2014/12/11 16:10 by czuber