diff --git a/in/public/code/c/index.rst b/in/public/code/c/index.rst index 9ada5f1..de4c1a7 100644 --- a/in/public/code/c/index.rst +++ b/in/public/code/c/index.rst @@ -13,14 +13,21 @@ Main system("pause"); } +Declarations +------------ + +.. code:: c + + char operator; + int entry1 = 0; + int entry2 = 0; + long entry = 0; + Input ----- .. code:: c - int entry1 = 0; - char operator; - int entry2 = 0; printf("type in 2 integers\n"); scanf("%d%s%d", &entry1, &operator, &entry2); printf("sum: %d\n", entry1 + entry2); @@ -45,3 +52,12 @@ Conditions default: printf("Nope!\n"); } + +Loops +----- + +.. code:: c + + while (condition) { + expression1; + }