How do you print a diamond pattern like this in C++?
Attachments:
Answers
Answered by
0
Answer:
1. Take the number of rows as input.
2. According to the number of rows, print the ” ” and “*” using for loops.
3. Exit.
Explanation:
mark me as brainlist
Answered by
0
The program output is also shown below.
1) /*
2) *C Program to Print Diamond Pattern.
3) #include <stdio.h>
4) int main()
5) {
6) int number, i, k, count = 1;
7) print ("Enter number of rows\n");
8) scan ("%d", &number);
Similar questions