Uncategorized

Sequence

Suppose that num1, num2, and num3 are int variables and the following statements are executed in sequence. 1. num1 = 18; 2. num1 = num1 + 27; 3. num2 = num1; 4. num3 = num2 / 5; 5. num3 = num3 / 4; The following table shows the values of the variables after the execution

Sequence Read More »

Inline member functions

6.     Write an object-oriented program in C++ to generate the following series of numbers using constructor, destructor and inline member functions. (i)                                                                                                                                                (ii) 1                                         1 2 1               1 2         3 2 1             1 2 3     4

Inline member functions Read More »

Variable declarations

The C11 program in Example 2-18 illustrates how to read strings and numeric data. The following statements are examples of variable declarations: int a, b, c; double x, y The following statements are examples of executable statements: a = 4; //assignment statement cin >> b; //input statement cout < a=””>< “=”” “=””>< b=””>< endl;=”” output=””>

Variable declarations Read More »

Interest calculations

Part 2. Interest calculations.Ask the user to enter a principal amount, in dollars and cents. Then ask the user for the annual interest rate. A rate of 5.25% per year would be entered as 5.25.(a) Calculate the interest earned for one year, compounded annually. Display the inputs, the interest earned, and the total balance at

Interest calculations Read More »

Evaluate

If int x = 10;, int y = 7;, double z = 4.5;, and double  w = 2.5;, evaluate each of the following statements, if possible. If it is not possible, state the reason. a. (x + y) % x  b. x % y + w c. (z – y) / w d. (y +

Evaluate Read More »

WhatsApp
Hello! Need help with your assignments?

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102

🛡️ Worried About Plagiarism? Run a Free Turnitin Check Today!
Get peace of mind with a 100% AI-Free Report and expert editing assistance.

X