+ 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 🙏🙏

10th Jul 2021, 2:53 AM
Viraj
Viraj - avatar
13 ответов
+ 1
Thank you so much ❤️
10th Jul 2021, 3:41 AM
Viraj
Viraj - avatar
+ 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
10th Jul 2021, 4:17 PM
6hpxq9
6hpxq9 - avatar
0
https://code.sololearn.com/cmZaHXqmXhNw/?ref=app need this pattern bro
10th Jul 2021, 3:00 AM
Viraj
Viraj - avatar
0
visph plz explain bro plz 🙏🙏 and check dm too 🙏🙏🙏 U rock 🤘 was trying from night but u made it in minutes 😲
10th Jul 2021, 3:29 AM
Viraj
Viraj - avatar
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'...
10th Jul 2021, 3:32 AM
visph
visph - avatar
0
From where u learned c++
10th Jul 2021, 3:34 AM
Viraj
Viraj - avatar
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
10th Jul 2021, 3:38 AM
visph
visph - avatar
0
Is this a basic problem ?
10th Jul 2021, 3:39 AM
Viraj
Viraj - avatar
0
all pattern problems are relatively basics: the most hard task would be to find the pattern to repeat ;)
10th Jul 2021, 3:40 AM
visph
visph - avatar
0
6hpxq9 brother this is not the pattern I needed anyway thanks
11th Jul 2021, 5:44 AM
Viraj
Viraj - avatar
0
Guru patel it's the same pattern. He just printed two more lines
11th Jul 2021, 9:42 AM
Nwalozie Elijah
Nwalozie Elijah - avatar
- 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 ;)
10th Jul 2021, 3:00 AM
visph
visph - avatar