+ 1
Pattern C++
Write a C++ program to print following pattern: 0 1 01 101 01101 10101101 0110110101101 101011010110110101101 0110110101101101011010110110101101 101011010110110101101 0110110101101 10101101 01101 101 01 1 0 Please someone help this lazy guy plz 🙏🙏
13 odpowiedzi
+ 1
Thank you so much ❤️
+ 1
I have made this, I know it's trash, but u know, It works and I just want to help
https://code.sololearn.com/cNA0DcP0SGyo/?ref=app
0
https://code.sololearn.com/cmZaHXqmXhNw/?ref=app
need this pattern bro
0
visph plz explain bro plz 🙏🙏 and check dm too 🙏🙏🙏
U rock 🤘
was trying from night but u made it in minutes 😲
0
I don't have dm (using a too old version of the app ^^)
explain is given in my first post...
implementation of second part use comparison with only one char: if '0', then add '1' and skip next char (wich is necessarly '1'), else add '0'...
0
From where u learned c++
0
from long time ago quickly... and more recently just do the course here... plus some practices and research to solve tasks ^^
I'm not very experiemented at C/C++ but I code from many years in others languages: that help for basic problems ;P
0
Is this a basic problem ?
0
all pattern problems are relatively basics: the most hard task would be to find the pattern to repeat ;)
0
6hpxq9 brother this is not the pattern I needed anyway thanks
0
Guru patel it's the same pattern. He just printed two more lines
- 1
you should replace 0 by 1 and 1 by 01:
0 => 1
1 => 01
01 => 1 01
101 => 01 1 01
01101 => 1 01 01 1 01
10101101 => ...
once you've printed the 9th line, do the inverse: 01 become 1 and 1 become 0 ;)