Lesson 10. As we see in the previous lesson, now we’ll make some algorithms to practice. Those are 10 questions. I recommend that you make this algorithms because it’ll help you in the future. 1- Make an algorithm that reserves how tall is a person and test this conditions: If the Tall is greater than 1.90, printf (“You can play basketball”); If the Tall is smaller than 1.50, printf (“You’re not taller”); if the Tall is greater or equal to 1.50 and smaller or equal than 1.90, printf (“You’re between arrive”); 2- Make an algorithm that works as a game, it may ask to user “What’s the Spanish Capital?” so the user will have available 4 possibility, they’re respectively a) Madrid, b) Barcelona, c) Vigo, d) Sevilla, after will be tested them. Note: use for store the result, a character type variable. If the variable is equal to ‘a’, so printf (“You’re Wright”); Else, so printf (“You’re wrong”); 3- Make an algorithm that works as a table,...
Now, I present to you the While command. It’s similar to Do While command in the lesson 14. below, we can see the structure. Below, see a example about the While loop use and the print of it running . Write it in your compiler. But if the condition be false, the code inside while will not ran. See the next example and test in your compiler. Well, it’s the enough to use the While loop. Please make the Challenges 14.1 using the Loop While learned in this lesson. In the next lesson, we’ll see the Loop FOR. Well, that’s all folks See you later!
Here is the algorithms that is asked in Lesson 10 About If-Else command. So, if you wish, you can make downloads of each question in Lesson 10. Question 1 Question 2 Question 3 Question 4 Question 5 Question 6 Question 7 Question 8 Question 9 Question 10 Note: if you use windows, you can include <stdlib.h> to use ‘system(“pause”);’, with this, you can pause the run up to user push enter. Well, that’s all Folks! See You Later!
Comentários
Postar um comentário