Fix this program so that this program prints out the


Program 1 ( selection statement )

Write a "Temperature Conversion" program.

Prompt the user to choose: 1) Centigrade to Fahrenheit, 2) Fahrenheit to centigrade.

Prompt the user for temp to convert.

Calculate new temp2. The calculation of the new temp2 depends on choice 1 or 2 above.

Print out temp2.

Be sure to use the C and F temp notation. (Hint: use decimal data types)

Use filename week3YourNameProg1Temp

Program 2 ( loop statement )

Fix this program, so that this program prints out the numbers 1 to 10.

What does it do as currently written ?

#include
using namespace std;
int main() {
for( int i = 1; i > 0; i ++) {
cout << "i = " << i << endl;
}
system("pause");
return 0;
}
Use filename week3YourNameProg2Fix

Program 3 ( Nested loop statement )

Write program using two(2) nested ‘for' loops to print out the values of a Multiplication Table 12 By 12.

Output should look like Table: 12 columns and 12 rows. SMake it look lined up... Hint Use the setw() function.

Hint: Multiply the first for loop value by the second for loop value...

Use filename week3YourNameProg3Mult

Program 4 - ( Functions )

In one program, write 3 separate functions.

1) Write the function body for each:

int squareInteger s( int x)

double squareDouble( double d)

float squareFloat ( float f)

They basically do the same thing, square a number, but use different argument datatype types.

2) Test Each function: Using int 6, double 6.9, float 9.1. Explain the results.

Use filename week3YourNameProg4funs

Be sure to include the code, test cases, conclusions and screen prints of the successful execution for each program.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Fix this program so that this program prints out the
Reference No:- TGS02899782

Expected delivery within 24 Hours