Problem 1. Write program to print the subsequent stars in the screen
*
**
****
********
****************
Problem 2. Suppose your $1,000 is earning interest at 4% per year.
How many years you need to double your money?
Write program to count the number of years.
Problem 3. In chess, the knight moves in a very special way:
either: two squares forward and one to the side
or : one square forward and two to the side
Write a program in C++ to describe the Probability of the moves
|
|
|
|
|
|
|
|
|
here
|
|
here
|
|
|
|
|
here
|
|
|
|
here
|
|
|
|
|
|
Knight
|
|
|
|
|
|
here
|
|
|
|
here
|
|
|
|
|
here
|
|
here
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Problem 4. Suppose three dimensional array a initialized with the followinga[row][col][dep] = row*col*dep;
Write program to determine the summation of all even elements of the array;