0% found this document useful (0 votes)
5 views2 pages

For Loop Questions

The document provides a series of programming tasks in C++ focused on generating various patterns using characters and numbers. It includes instructions for creating square patterns, right-angle triangles, and pyramids with different configurations. Each task specifies the desired output format, such as using '#' characters, asterisks, or sequential numbers.

Uploaded by

harshbhumihar121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

For Loop Questions

The document provides a series of programming tasks in C++ focused on generating various patterns using characters and numbers. It includes instructions for creating square patterns, right-angle triangles, and pyramids with different configurations. Each task specifies the desired output format, such as using '#' characters, asterisks, or sequential numbers.

Uploaded by

harshbhumihar121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. Write a program in C++ to print a square pattern with the # character.

Sample Output:
Print a pattern like square with # character:
####
####
####
####
2. Write a program in C++ to display the pattern like right angle triangle.
*
**
***
****
*****
3. Write a program in C++ to display the pattern like right angle triangle
with number.
1
12
123
1234
12345
4. Write a C++ program that makes a pattern such as a right angle triangle
using numbers that repeat.
1
22
333
4444
55555

5. Write a C++ program to make such a pattern like a right angle triangle
with the number increased by 1.
1
2 3
4 5 6
7 8 9 10
6. Write a C++ program that displays the pattern like a pyramid using
asterisks, with odd numbers in each row.
*
***
*****
*******
7. Write a C++ program to make such a pattern like a pyramid with
numbers increased by 1.
Sample Output:
1
2 3
4 5 6
7 8 9 10

8. Write a C++ program to make such a pattern, like a pyramid, with a


repeating number.
Sample Output:
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

You might also like