Write a program that adds up the squares and adds up the cubes of integers from 1 to N, where N is entered by the user:
Do this by using just one loop. Click here to go back to the main menu.Upper Limit: 5 The sum of Squares is 55 The sum of Cubes is 225
Write a program that computes XN where X is a floating point number and N is a positive integer. The program will inform the user that N must be positive if the user enters a negative value. Of course,
XN = X * X * X * ... * X
--------------------
N times
The user dialog will look something like this:
Click here to go back to the main menu.Enter X 1.3 Enter N 5 1.3 raised to the power 5 is: 3.71293 ------- Enter X 5.6 Enter N -3 N must be a positive integer.
Write a program that will write out a wedge of stars. The user will enter the initial number of stars, and the program will write out lines of stars where each line has one few star than the previous line:
Click here to go back to the main menu.Initial number of stars: 7 ******* ****** ***** **** *** ** *
Write a program that will write a tree made of stars on the terminal:
*
***
*****
*******
*********
***********
*************
***************
***
***
***
Click here to go back to the main menu.