I need help making this program.
It MUST include the following elements:
- documentation explaining what certain lines of code do (comments)
- 7 variables
- 1 math operation
- a string
- output to the screen
- prompt input form the user
- a logical operator
- a relational operator
- a if or/else structure
- a switch structure
- a loop
Should be at least 50 lines of code
I need like an outline or example so I know what to do.
Seems like this allows you to be creative and use your imagination in choosing what you want your program to do.
one math operation - You need to do some sort of calculation.
A string - that could be a name of someone or maybe a store? Or a message to print out?
Output to the screen - print out the string or result of some calculation?
Get input from the user - ask them for their name? for a number to use in the calculation?
a logical operator - sounds like this could be used in conjunction with the relational operator, something less than something else AND (OR) something else greater than something else. Or some variation on that.
an if/else structure - so if one result, or one input from the user is something take one path, otherwise, take a different path
A switch statement - use with an int or char value to executive different blocks of code - maybe this is based on some number or letter the user types in
A loop - for or while - maybe the user wants to do something a fixed number of times? or you want to do something while a condition is false?