Reference no: EM13907368
1. Ask the user for a color
2. If the user types your favorite color (if you don't have one, pick blue), output That is my favorite color to the console Otherwise, output What color is that again?
Create a flowchart and do the following
1. Ask the user for how many cats they own (use the variable cats)
2. Assign cats into the variable animals
3. Ask the user for how many dogs they own (use the variable dogs)
4. Increment animals by the value of the variable dogs
5. Output the value of animals, which should now be the total number of cats and dogs
Instructions
Create a flowchart and do the following
1. Assign 15 into the variable count
2. Increment count by 7
3. Output the value of count to the Master Console
Create a flowchart and do the following
1. Add a loop symbol
2. Initialize the loop control variable count with the value of 0 (before the loop)
3. Use count = 5 as the loop Boolean expression
4. Inside the loop do the following in order
1. output the string hey
2. increment count by 1
Create a flowchart and do the following
1. Add a loop symbol
2. Initialize the loop control variable num with the value of 0
3. Inside the loop ask the user for a number. if the number is equal to 5 exit the loop.
4. When the loop exits, output the message Finished!
Part I
Write a number guessing game program. The program will first generate a random number from 1 to 100. Then, the user guesses a number and the game will report whether the guess is too low or too high. if the guess is correct the game will report that the user won.
To generate a random integer from 1 to n, use floor ( (random * n) + 1)
For example, to generate a random number from 1 to 6, use the following code: floor ( (random 6) + 1)
Part II
Add a variable for the number of tries, and when the user wins report how many tries it took them.
Instructions
Jse a loop to Ask the user for 5 test scores (1 to 100) and store them in an array then, output the numbers backwards
Extra Credit
Find the lowest, highest & average test score (using a loop)
Program that declares three variables minnum
: Write a C++ program that declares three variables minNum, midNum and maxNum to receive three integers read from the keyboard.
|
Where security is an it concern.
: Take a few minutes to consider all areas where security is an IT concern. Select one you think is the most important and explain why you consider it important. As we go through the course, visit this topic again and see if you agree with your first ..
|
Requires an initial cash outlay
: AXY requires an initial cash outlay of $675,000 for equipment. You expect to spend an additional $45,000 in the first year to cover costs as the project will produce negligible cash inflows for that year. During years 2 through 6, you expect to recei..
|
What would the risk-free rate have to be for the two stocks
: Stock Y has a beta of 1.3 and an expected return of 13 percent. Stock Z has a beta of 0.75 and an expected return of 10.5 percent. What would the risk-free rate have to be for the two stocks to be correctly priced relative to each other?
|
Write a number guessing game program
: Write a number guessing game program. The program will first generate a random number from 1 to 100. Then, the user guesses a number and the game will report whether the guess is too low or too high.
|
Considering an annuity which costs
: You are considering an annuity which costs $54200 today. The annuity pays $5800 a year. The rate of return is 6 percent. What is the length of the annuity time period?
|
Exist at the start of the next decade
: Which jobs that exist today likely will not exist at the start of the next decade? Based on your best guess on how technology will develop, can you think of jobs and skill sets that will likely emerge as critical five and 10 years from now?
|
Who are the stakeholders in this situation
: However, if you disclose news of the dump problem now, the offering will likely be jeopardized. But the prospect of holding a news conference and explaining your role in keeping the dump a secret keeps you up at night - Who are the stakeholders in..
|
Treausy rate-what is this stocks required rate of return
: The ten year US Treausy rate is currently 3.37%, the long term expected market rate is 11.5%, and a stock's beta is 1.47. Using CAPM, what is this stocks required rate of return
|