Programming Simple Exercises : Input and Decision Making


Here are some simple exercises which involves input and conditions.

1. Write a program that accepts your name and display it to the screen.


2. Write a program that accepts any number multiplied then multiply it by 2, display the product.


3. Write a program that accepts any number, display “MAX” if the number is greater than or equal to 50.



4. Write a program that can accepts your name. Then display your name to the screen.


5. Write a program that accepts a word. If the inputted word spells ‘BOLT’, the it will give a message “You got me!”, if not then display "You've got it wrong"


6. Write a program that accepts a number. If the inputted number is less than 10, display message “You entered small numbers”.

Labels: