Introduction
In programming, loops are used to execute a set of instructions repeatedly as long as the given condition is true. The Do-While loop is used when we need to execute the block of code at least once, and then check the loop condition.
In this lab, we will create a Do-While Loop program in C that prints the numbers from 10 to 1 in descending order.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
c(("`C`")) -.-> c/UserInteractionGroup(["`User Interaction`"])
c(("`C`")) -.-> c/BasicsGroup(["`Basics`"])
c(("`C`")) -.-> c/ControlFlowGroup(["`Control Flow`"])
c(("`C`")) -.-> c/FunctionsGroup(["`Functions`"])
c/UserInteractionGroup -.-> c/output("`Output`")
c/BasicsGroup -.-> c/comments("`Comments`")
c/BasicsGroup -.-> c/variables("`Variables`")
c/BasicsGroup -.-> c/data_types("`Data Types`")
c/BasicsGroup -.-> c/operators("`Operators`")
c/ControlFlowGroup -.-> c/while_loop("`While Loop`")
c/FunctionsGroup -.-> c/function_declaration("`Function Declaration`")
subgraph Lab Skills
c/output -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
c/comments -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
c/variables -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
c/data_types -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
c/operators -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
c/while_loop -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
c/function_declaration -.-> lab-123238{{"`Create Descending Do-While Loop in C`"}}
end