Anyone who can help me create a code to make shapes using "for loop" plsss Im just a beginner | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Anyone who can help me create a code to make shapes using "for loop" plsss Im just a beginner

like this * ** *** **** ***** and ***** ***** ***** ***** *****

6th Aug 2016, 10:09 AM
khaye llanera
khaye llanera - avatar
8 Answers
+ 3
Try this # include < iostream.h > using namespace std; int main() { int i,j; for ( i=1; i<=5; i++) { cout << " \n "; for ( j=1; j<=i; j++ ) { cout << " * "; } } return 0; } OUTPUT * ** *** **** *****
6th Aug 2016, 11:31 AM
Vasuthaarini
+ 1
if you mean * ** *** ** * simply make a function that counts up the amount then when it reaches a certain point it counts down
6th Aug 2016, 10:45 AM
Null Void
Null Void - avatar
0
Thankyou guysss
6th Aug 2016, 11:55 AM
khaye llanera
khaye llanera - avatar
0
I got output for that
6th Aug 2016, 12:20 PM
Vasuthaarini
0
check at the code play ground I have posted this program *pattern
6th Aug 2016, 12:21 PM
Vasuthaarini
- 1
Guys pls help me. if you'll help me thats really appreciated. All of the codes i tried were all infinite 😢😢😢😢
6th Aug 2016, 10:11 AM
khaye llanera
khaye llanera - avatar
- 1
Refer to Class 11 book by Sumita Arora on C++
6th Aug 2016, 11:54 AM
Rajat Gupta
Rajat Gupta - avatar
- 1
Its not working😢😢😢😢😢
6th Aug 2016, 12:09 PM
khaye llanera
khaye llanera - avatar