Write a statement that reads 5 successive integers into these variables that have already been declared : x1 x2 x3 x4 x5. Then write a statement that prints each out on its own line so that they form a right-justified column with a 5-digit width. If any of the integers are 5-digits in size, then they will start at the very beginning of their lines. For example: |54213 |8713 |23 |147 |15

C++

LANGUAGE: C++ CHALLENGE: Write a statement that reads 5 successive integers into these variables that have already been declared : x1 x2 x3 x4 x5. Then write a statement that prints each out on its own line so that they form a right-justified column with a 5-digit width. If any of the integers are 5-digits…

Read More

Write the necessary preprocessor directive to enable the use of the exit function. Write the definition of a function named panic. The function prints the message “unrecoverable error” and then terminates execution of the program, indicating failure..

C++

LANGUAGE: C++ CHALLENGE: Write the necessary preprocessor directive to enable the use of the exit function. Write the definition of a function named panic. The function prints the message “unrecoverable error” and then terminates execution of the program, indicating failure.

Read More

Given an int variable x write some statements that attempt to open a file named “table20″ and read a value into x; if that turns out not to be possible your code should then read avalue from standard input into x.

C++

LANGUAGE: C++ CHALLENGE: Given an int variable x write some statements that attempt to open a file named “table20″ and read a value into x; if that turns out not to be possible your code should then read avalue from standard input into x.

Read More

Read first a user’s given name followed by the user’s age from standard input. Then use an ofstream object named outdata to write this information separated by a space into a file called outdata. Assume that this is the extent of the output that this program will do.

C++

LANGUAGE: C++ CHALLENGE: Read first a user’s given name followed by the user’s age from standard input. Then use an ofstream object named outdata to write this information separated by a space into a file called outdata. Assume that this is the extent of the output that this program will do.

Read More

Given the availability of an ifstream object named indata and an ofstream object named outdata, write the other statements necessary to read one integer from a file called currentsales and write twice its value into a file called projectedsales. Assume that this is the extent of the input and output that this program will do.

C++

LANGUAGE: C++ CHALLENGE: Given the availability of an ifstream object named indata and an ofstream object named outdata, write the other statements necessary to read one integer from a file called currentsales and write twice its value into a file called projectedsales. Assume that this is the extent of the input and output that this…

Read More