Exercise 7 - 01/31/2017
1. Write a program to print the sum of the first 200 even mumbers (0 included).
Sample Output:
The sum of the first 200 even numbers is : 39800
2. Write a program to find the nth power of a number x. That is, read in a real number x and an integer n, and caclulate x raised to n. You can assume that neither x nor n will be 0. n will always be a positive number.
Sample Output 1:
Enter x: 2
Enter the exponent n: 7
2^7 = 128
Sample Output 2:
Enter x: 10.75
Enter the exponent n: 5
10.75^-2 = 143562.932617