Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1_Declare an int variable called aNumber and assign it a value of 24? 2_Declare 2 double variables, myMoney and yourMoney on the same line. Do

1_Declare an int variable called aNumber and assign it a value of 24?

2_Declare 2 double variables, myMoney and yourMoney on the same line. Do NOT give them initial values?

3_Output to the screen the result of the math problem 23 - 87 X 45. Have the program calculate the result?

4_Output (without quotes) "The square root of 87 is:xx", where xx is the actual square root of 87. Have the program calculate the square root value?

5_Get a char from the user. If the value of the char is 'U', output, "It's You.", if the value is 'I', output, "I did it.", otherwise, output, "I don't know who did it." Assume the user will enter a valid single character.?

6_Output the following, showing the quotes as shown below:

MLK said, "the measure of a man is where he stands in times of adversity."

7_Output the ASCII value of the minus sign (-). You must do this without consulting the ASCII table.

Output the char value that corresponds to the ASCII value 93, again without using the ASCII table.

8_Declare a double array of 4 elements.

9_Given the declaration below, create a loop that will efficiently output every value in the savings array. Assume you know the size of the array is 35 elements.

In another loop, only output values from the savings array that are more than 8.1.

double savings[35] = {6.06, 3.03, 5.31,3.32, 5.49, 5.24,9.3,3.81,5.02,8.52,9.64,4.73,4.61,2.09,5.23,5.91,9.21,9.14,7.32,9.84,9.84,7.47,1.69,5.36,3.07,4.99,2.45,5.7,6.61,9.43,6.74,4.27,2.79,9.66,1.73};

10_Which of the following lines, if any, will cause a syntax error? What is the error? If you believe a particular line will create output, state the output. Try to answer this without typing in the code.

bool b = 5 == 6;

int _o=0,_=35,_t_;

double doubler, doubled, doubles=2,Int;

char ZERO = 0, ONE = '1', two='t';

cout << "16 + 3" << 16 + 3;

cout << "H" << 'ello there 1';

cout << "H" << "ello there" << '2';

cout << 'H' << "ello there" << 3;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions

Question

To be able to explain what service operations management is

Answered: 1 week ago