C++ Tutorial Lect 11.2 : Advanced loop programs (Pow function)

preview_player
Показать описание
Gaith Albadarin
Visiting Professor
Computer Science Department
Texas Wesleyan University

Program 5:
Write a program to find the sum of first
n
natural numbers where n is entered by user:
Example:
Enter a Number : 5
Program should output:
The sum of the first 5 numbers = 15

Program 6:
//Use a loop and don't use the power function.
Write a program that allows the user to calculate a base raised to an exponent. At the end of the
program prompt the user if they wish to perform another calculation. For all prompts allow the user to
make a selection with both upper or lower case letters(Y or N).
Рекомендации по теме
join shbcf.ru