C++ Assignment – (Maximum Group of 5)
Submission Date: 25-9-2017
1. Write a program which prints the following shape
A. 1 212 010101
010 32123 0
00100 4321234 111111
0001000 54321234 1
00001000 5 000100
0 0
C. 0 0 0 1 0 0 000100
0 0
B. 1
2. Write a program that print all prime numbers found between 1 and 100
3. Write a program that print prime numbers found between 1 and N, where N
is an input number given by the user
4. Write a program to check if all the digits in a given number are the same.
Example:
o Input: 7777
o Output: Yes
5. Use nested loops to generate Floyd’s Triangle of n rows. It's a right-angled
triangle of natural numbers.
1
23
456
7 8 9 10
11 12 13 14 15
6. Print a square of size n, where the border has numbers and the inside is
blank.
Example
o Input: 4
Output: 1 1 1 1
1 1
1 1
1 1 1 1