Question: please write in C+ using stdio.h and math.h In general, use lower case letters for variable names. Variable names should be mnemonic, Separate multiple words
In general, use lower case letters for variable names. Variable names should be mnemonic, Separate multiple words in a variable name with an underscore or begin the second word with an uppercase letter. Indent 2-4 spaces (optimally 3) within main. The editor should take care of proper indenting, Place no more than one C statement per line. Since we have not studied the math library yet, use multiplication (x*x or x*x*x) to square or cube a value. . Programs: 1. Write a program that prompts the user to enter three integers and reads the three values with a single scanf statement or in separate scanf statements. Write statements to find the square of each value and the cube of each value. Print the values, their squares, and their cubes in a labeled table aligned as in the example shown below. Use four lines of output statements. The output should look something like this, depending on the numbers entered: Number Square Cube 2 4 8 4 16 6 36 216 64 For this problem you can proceed as follows: Declare integer variables for the three numbers, the three squares, and the three cubes. Enter the three original integers. Find the square and cube of each number. Print the table using 4 printf statements (one for labels and three for the values). (Alternatively, you can embed the calculations in the printf statements. Using this method, you can proceed without needing variables for the squares and cubes.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
