Write a C++ program that will print the pattern as shown below:
Output:
*
***
*****
*******
*********
*********
*******
*****
***
*
fawadali
0
Newbie Poster
Recommended Answers
Jump to PostWhat do you have so far?
Jump to Post
printf("*\n***\n*****\n*******\n*********\n*********\n*******\n*****\n***\n*");
Jump to PostI like it Moschops! Keep it simple...
Jump to PostHere is #3...
std::cout << "*" << std::endl << "***" << std::endl << "*****" << std::endl << "*******" << std::endl << "*********" << std::endl << "*********" << std::endl << "*******" << std::endl << "*****" << std::endl << "***" << std::endl << "*" << std::endl;
Just …
All 13 Replies
pritaeas
2,194
¯\_(ツ)_/¯
Moderator
Featured Poster
Moschops
683
Practically a Master Poster
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
fawadali
commented:
its not answer of my question
+0
fawadali
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
NathanOliver
429
Veteran Poster
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
rubberman
1,355
Nearly a Posting Virtuoso
Featured Poster
dbfud1988
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
dbfud1988
0
Newbie Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
dbfud1988
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.