Write a c program that uses the statements in exercise to


Question: Write a C program that uses the statements in Exercise to calculate x raised to the y power. The program should have a while repetition control statement.

Exercise: Write single C statements that

a) Input unsigned integer variable x with scanf. Use the conversion specifier %u.

b) Input unsigned integer variable y with scanf. Use the conversion specifier %u.

c) Set unsigned integer variable i to 1.

d) Set unsigned integer variable power to 1.

e) Multiply unsigned integer variable power by x and assign the result to power.

f) Increment variable i by 1.

g) Test i to see if it's less than or equal to y in the condition of a while statement.

h) Output unsigned integer variable power with printf. Use the conversion specifier %u.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a c program that uses the statements in exercise to
Reference No:- TGS02403589

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)