A) // This code should use a loop to raise a number to a power.
int num, bigNum, power, count;
cout <>
cin >> num;
cin >> power;
bigNum = num;
while (count++
bigNum *= num;
cout <><>
B) // This code should average a set of numbers.
int numCount, total;
double average;
cin >> numCount;
for (int count = 0; count <>
{
int num;
total += num;
count++;
}
average = total / numCount;
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here