solve this programming

Question Description

  1. how to write this programming
  2. Print the output of the following exactly as it appears on the screen, x is integer with value 53.
    cout <<  "abc " << x << endl << hex << 0x1f << "def/n"         << 0x30 << setw(4) << dec << x;
  3. Print the output of the following exactly as it appears on the screen.
    Assume fixed mode has been set, z is float with value 45.67834.
    cout << setw(8) << setprecision(2) << z << "n "     << setw(9) << setprecision(1) << z ;
  4. Trace the values of the variables in the following program. Repeat the value if it is the same.
    void main(void){   int w,y,z;           w     y     z   w=6;y=12;z=18;       __    __    __   y = w % 4;           __    __    __   z = z * 3;           __    __    __   w = y / 2;           __    __    __   y = w +z*2;          __    __    __}
  5. Correct the syntax errors in the following program. Do not change what the program does.
    include <iostream>  using namespace std;int main(  void  ){   cout >> 'Enter 2 integers';   cin << x << y;   If x>0  cout << setw(7) << "Positive";}

  6. Write a nested if statement. This will be similar to the examples in class or on your program. Be especially careful with the logic and take all cases into account. Here is an example
    Write a nested if statement that prints 1 if x is positive, 2 if x is negative and 3 if x is a zero. (x is an integer variable)

Get your college paper done by experts

Do my question How much will it cost?

Place an order in 3 easy steps. Takes less than 5 mins.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *