Question: Write the C + + Statements to do the following: Declare & Initialize an integer variable x to a value of 3 3 and an

Write the C++ Statements to do the following:
Declare & Initialize an integer variable x to a value
of 33 and an integer variable y to a value of 55.
Divide 'x' by 'y' and store the result in a double
variable named 'z'. Did you get the result you were
expecting? Discuss.
Using the C++ Code that you created for Execise #2,
cast the variable 'x' to a type 'double' in the
expression:
z = x / y;
Run your code in GDB Compiler.
Compare outcome of #4 with the outcome of #2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!