Algorythm exercises

Previous Next

1. Create an algorithm to calculate the average of your marks.


2. Write an algorithm that calculates a rectangle surface, an empty rectangle surface, a disk surface and an empty disk surface.


3. Write an algorithm that asks the user to enter a distance vector coordinates and a Force vector coordinates and display Torque between the two vectors.


4. Write an algorithm that transforms inch in meters, pounds in kg and Pounds in Euros.


5. Write an algorithm that transforms a rotation speed in rpm in a linear speed in km/h.


6. Write an algorithm that allows you to calculate the intensity of a vector and the angle that it has with the horizontal.


7. Write an algorithm that allows you to choose a country and to give the capital of this one. Consider to do the reciprocity.


8. Write an algorithm that asks the user to enter two numbers and display the biggest.


9. Write an algorithm that requests two numbers from the user and then informs them if their product is negative or positive.


10. Write an algorithm that asks the age of a child to the user. Then it informs him of his category:

"Poussin" from 6 to 7 years "Pupille" from 8 to 9 years "Minime" from 10 to 11 years "Cadet" after 12 years


11. Write an algorithm that asks you to enter the size of 10 people and calculates the number of people whose size is less than 1.70 m.


12. An electronic vote is organized, a computer allows each vote to be entered and counted. Voters can answer with Y (yes), N (no) or B (blank).

Write an algorithm that asks n voters their vote and writes at the end of the vote the percentage of Yes, No and white vote


13. Write an algorithm which allows you to find the result of a second degree equation


14. Write an algorithm which allows you to read N numbers and display their total and their product.


15. Write an algorithm which allows you to display a lesson on materials.


16. Write an algorithm which allows you to display the results of the throwing of several dies (ask the number of dies et the beginning).


17. Write an algorithm which allows you to learn your lesson (Ask a question and answer Yes or No). After twenty questions, give a mark.



Created with the Personal Edition of HelpNDoc: Full-featured multi-format Help generator