Question: int i = 3 , j = 1 0 ; double x = 9 . 9 , y = - 0 . 6 ; To

int i =3, j =10;
double x =9.9, y =-0.6;
To help, 3 as an 8-bit binary number is 000000112 and 10(ten) as an 8-bit binary number is 000010102. Further, use the following to print a value in binary:
#include // just under the include in iostream
// prints in binary
cout <<i <<2 is: << std::bitset<8>(i<<2)<< endl;
__ i / j
___ i % j
___ j / i
___ j % i
___ x * i / j
___ x *( i / j)
___ x / y + i
___ j + y / x
___ static_cast (i)/ j + y
___ x /( y + i )
___(j + y)/x
___ i | j
___ i & j
___ i <<2
___ j >>3
Then, write a C++ program in a file called pp1c.cpp with a main function that computes the values above and prints them. Remember to see the test to ensure the program prints all output that is required. Are the values you determined on paper correct?

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!