Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program 1 ( selection statement ) Write a Temperature Conversion program. Prompt the user to choose: 1) Centigrade to Fahrenheit, 2) Fahrenheit to centigrade. Prompt

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions

Question

=+4. Are there areas where you are seeing healing take root?

Answered: 1 week ago