|
Programming Exercises - Input
Page history
last edited
by Steve Sweeney 10 years, 2 months ago
- Write a program that prompts (asks) the user for their name and age, and then outputs this information using one or two nicely formatted sentences. For example, if the user enters the name "John" and the age "16", the program might output, "Hello John. I see that you are 16 years old."
- Write a program that asks two questions: first name and last name. The program should then output this information with the last name first. For example, if the user entered "Fred" and "Flintstone", the output would be "Flintstone, Fred".
- Write a program that prompts the user for their full address, one piece of information at a time, and save each piece of information in a different variable. Use variables for streetNumber, streetName, city, province, and postalCode. Make sure your output is nicely formatted, as it might appear on an envelope for mailing.
- Write a program that prompts the user for 4 course marks. Each mark should be saved in a properly named variable. Once the user has entered the last mark, output a summary of the marks.
Programming Exercises - Input
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
Comments (0)
You don't have permission to comment on this page.