I need help with this question anyone please....
You neglected to post the question. :)
Where is the question?
Assume that quest is an integer variable containing a question number. Write a program that places the last name of a US President into the Text property of textbox txtOut according to the following criteria: "Washington" (if quest = 0), "Lincoln" (if quest = 1), "Jefferson" (if quest = 2), or "Roosevelt" (if quest = 3). Write the above mentioned program: Using switch statement Using multiple alternative if statements Using only properly indented and nested double alternative if statements
Most computer games use formulas to define what happens when a user interacts with the environment. For example, the formula for how much damage a player inflicted on a monster might be something like: damage = (player strength + player weapon) – monster's protection Assume that there are 100 possible values for each of the variables on the right side of this formula (from 0 = weak to 99 = strong). Write a program that: Allows the users to enter their strength, weapon strength, and the monster's protection Finds out what the damage will be on clicking a button Design a complete solution, including an interface sketch, object table, data table, algorithm, table of testing strategy, and trace examples of good and invalid data through the algorithm to verify that it is correct.
Okay, what's your question?
Are you asking us to write these for you from scratch? Why would we? If you write them and get stuck on an error, fine, post it. If you don't understand a term like switch, ask about it. But if you want people to write code for you, I doubt it is going to happen.
I don't understand the question I have done research on them both and to no avail have I seen what they mean!!
"Washington" (if quest = 0), "Lincoln" (if quest = 1), "Jefferson" (if quest = 2), or "Roosevelt" (if quest = 3). Write the above mentioned program: Using switch statement Using multiple alternative if statements Using only properly indented and nested double alternative if statements
Do you know what a switch statement is? What language is this being written in?
C++ and now I don't know what a switch statement is
Scroll to the bottom of this page, and look at the "The selective structure: switch." part there: http://www.cplusplus.com/doc/tutorial/control/ And two other documentation/examples: http://msdn.microsoft.com/en-us/library/k0t5wee3%28v=vs.80%29.aspx http://www.tutorialspoint.com/cplusplus/cpp_switch_statement.htm
Join our real-time social learning platform and learn together with your friends!