solve this programming

solve this programming

  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" _x000D_
            << 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 "_x000D_
         << setw(9) << setprecision(1) << z ;_x000D_
    
  4. Trace the values of the variables in the following program. Repeat the value if it is the same.
    void main(void)_x000D_
    {_x000D_
       int w,y,z;           w     y     z_x000D_
       w=6;y=12;z=18;       __    __    ___x000D_
       y = w % 4;           __    __    ___x000D_
       z = z * 3;           __    __    ___x000D_
       w = y / 2;           __    __    ___x000D_
       y = w +z*2;          __    __    ___x000D_
    }
  5. Correct the syntax errors in the following program. Do not change what the program does.
    include <iostream>_x000D_
      _x000D_
    using namespace std;_x000D_
    _x000D_
    int main(  void  )_x000D_
    {_x000D_
    _x000D_
       cout >> 'Enter 2 integers';_x000D_
    _x000D_
       cin << x << y;_x000D_
    _x000D_
       If x>0  cout << setw(7) << "Positive";_x000D_
    _x000D_
    }

  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)

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper