Chapter 5: Problem 36
include
\(<\) iostream \(>\) using namespace std; int main ( ) \(\\{\) int num, bigNum,
power, count; cout \(<<\) "…
#
A) // This program uses a loop to raise a number to a power. # include \(<\)
iostream \(>\) using namespace std; int main ( )
\(\\{\) int num, bigNum, power, count;
cout \(<<\) "Enter an integer: "; \(\operatorname{cin} \quad>>\) num
cout \(<<\) "What power do you want it raised to? "; cin \(>>\) power bigNum \(=\)
num; while (count++ \(<\) power); bigNum \(*=\) num; cout \(<<\) "The result is \(<<\)
bigNum \(<<\) endl return 0
\\}
B) // This program averages a set of numbers. # include
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.