- Take a sentence as input from user
- Calculate and show:
sentence's length
,number of vowels
.
- Take a number
n
between 5-20 as input from user - Create an array of length
n
- Put random number (1-100) in each element of the array
- Display the array's element by comma separated. Eg.
1,56,2,88,2
- Show the sum of the all the elements of the array
- Take a number
n
between 5-20 as input from user - Create an array of length
n
- Put random number (-100 to 100) in each element of the array
- Find the largest number in the array
- Add that largest number to all the array elements
- Make a game grid of 10x10 length.
- Each tile of the grid should show as a
.
- Example, a 3x3 grid would show as:
...
...
...
- Place the game character at (0,0) and it show as
x
. Eg:
x..
...
...
- Now continously take input from user. If user pressed up arrow, move the
x
character up, if user presses left, move left and so on... - On each arrow press, clear the screen and reprint the game grid with current state.
- Make an array of integers. Length should be 10. This array's length is always 10.
- Fill the array with random integers from 0-100.
- Print the array on the screen like so:
3 | 4 | 8 | 54 | 99
- Now continuously take input from user.
- If user presses a number, insert the number to the right. And because the array length should always be 10, remove one number from the left.
- After any input, clear the screen and reprint the array.
- This is to be done on top above program "Fixed Length Stack".
- If during input loop, user presses right arrow, set the insert direction to "right". That means any subsequent numbers should be inserted from right.
- If during input loop, user presses left arrow, set the insert direction to "left". That means any subsequent numbers should be inserted from left.