Postagens

Mostrando postagens com o rótulo Exercises

Course C Initial 14.1 – Do While Challenges

Imagem
As I said in the previous lesson, Access Here , I have to you 5 challenges to you practice your ability. 1- Make an algorithm that ask to user type numbers, the stop condition is when was typed the Number 0, say to user the stop condition. 2- Make an algorithm that aks to user many numbers, use the stop condition, when the user type 0, so print the sum result at display. 3- Make an algorithm that ask to user type a number and so use a do while to decrement this number up to 0. print them at display. 4- Make an algorithm that ask to user a number, you’ll multiplies by its predecessor up it be 0. Print all the process. 5- Make an algorithm that as to user letter, user the variable different of space character as condition. In the next lesson, we’ll see the Command While. Share it with your friends! Well, that’s all folks! See you later!

Course C Initial 12nd – Exercises with Switch

Imagem
Now, do these Algorithms using switch command. 1- Make an algorithm that works as a game, it may ask to user “What’s United Kingdom Capital?” so the user will have available 4 possibility, they’re respectively a) Manchester, b) Newcastle, c) London, d) Liverpool, after will be tested them. Note: use for store the result, a character type variable. Case ‘c’, so printf (“You’re Wright”); default, so printf (“You’re wrong”); 2- Make an algorithm that reserves the product code and the quantity, so calculate the prices. Note: before defines how you can see below: ‘ M’ – Milk – U$ 1,00 1L. ‘ P’ – Potato – U$ 2,50 Kg. ‘ E’ – Meat – U$ 10,00 Kg. ‘ J’ – Juice – U$ 0,50 each. Use switch structure, for invalid values, use default to show a note at display. After multiple the price by quantity and print the total price. 3- Make an algorithm that works how a calculator. Use a char variable to store the operator and so make the operation and show...

Course C Initial 10th – Exercises with If-Else

Imagem
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,...

Course C Initial – 4th First Exercises

Imagem
Now, as promised in previous lesson, here are some questions to you made: Make an Algorithm that print I’m fine at display. Make an Algorithm that store a number to a variable and print it at display. Make an Algorithm that reserves a number and a letter and print them at display. Make an Algorithm that reserves an integer and a floating and print them. Make an Algorithm and inside, create a float variable called Number that stored the number 7.596, after print it with only one decimal house. Make these algorithms, practice because this will help you to learn more and better. Below you can make download of their: Question 1   Question 2 Question 3   Question 4 Question 5 Well, that's all folks! In the next lesson, we'll see othres important commands! Share with your friends! See you later!