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 and an integer variable y to a value of
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 #
cast the variable x to a type 'double' in the
expression:
z x y;
Run your code in GDB Compiler.
Compare outcome of # with the outcome of #
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
