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

C++ Code for Diamond Pattern Output

This C++ program prints an ASCII art pyramid pattern of asterisks (*) with decreasing numbers of asterisks on each line. The main function contains a cout statement that prints the pyramid pattern without any loops, then returns 0 to indicate the program executed successfully.

Uploaded by

Dariru Kun
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)
4 views2 pages

C++ Code for Diamond Pattern Output

This C++ program prints an ASCII art pyramid pattern of asterisks (*) with decreasing numbers of asterisks on each line. The main function contains a cout statement that prints the pyramid pattern without any loops, then returns 0 to indicate the program executed successfully.

Uploaded by

Dariru Kun
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

Daryll S.

Rebellon

BSCpE-2A

Code:

#include <iostream>

using namespace std;

int main() {

cout << "****************\n"

"******* *******\n"

"****** ******\n"

"***** *****\n"

"**** ****\n"

"*** ***\n"

"** **\n"

"* *\n"

"* *\n"

"** **\n"

"*** ***\n"

"**** ****\n"

"***** *****\n"

"****** ******\n"

"******* *******\n"

"****************\n"

return 0;

}
Output:

You might also like