+ 2

why it does not decrement value of l as ordered? (write your name crossed. like X.)

semi succesfull try to solve problem https://code.sololearn.com/cLBSluN9dZ1z/?ref=app

24th Oct 2017, 11:30 PM
kronos
kronos - avatar
11 Answers
+ 2
I tried to do something based on your code :) Is not the best(yet), but i wanted to try it :)) So for now is working for a word with 4 char, but can be improved(a lot). https://code.sololearn.com/c3pWeX0J66Da/#cpp
27th Oct 2017, 12:55 AM
derXred
derXred - avatar
+ 1
2nd and 3d try. all good untill second name and first crossing.Then first push second.Any solutions? https://code.sololearn.ctom/ckpWsnSwL79f/?ref=app https://code.sololearn.com/c6W7dlbrkX0W/?ref=app
26th Oct 2017, 9:27 PM
kronos
kronos - avatar
+ 1
4th try ( initializing space) after Morpheus interpolation wirh matrix htps://code.sololearn.com/c9jFKI7HfcU7/?ref=ahtt
26th Oct 2017, 10:28 PM
kronos
kronos - avatar
+ 1
what is that output at 4th try? so many numbers......
26th Oct 2017, 10:52 PM
kronos
kronos - avatar
+ 1
Kronos here's ur solution ur way , following changes I did 1. indented code, so it looks good for me , hence understand easily ur logic 2. keep the no. of variables as low as possible 3. removed useless for loops for printing string character by character, just used cout>>s , it's not C 4. best thing , copied ur code again to make the lower part of X .šŸ˜‹ https://code.sololearn.com/c7HjJZj2a0Zx/?ref=app
26th Oct 2017, 11:17 PM
Morpheus
Morpheus - avatar
+ 1
i have not time for now but Morpheus.. you are coming out of the screen(MATRIX)!
26th Oct 2017, 11:38 PM
kronos
kronos - avatar
+ 1
A bit late, but here is my version of this program, that I made trying to improve derXred code who himself was trying to improve kronos code. Funny how the ideas spread around! So my code does the same, in a more generic way, and adds some automatic "decorations" after the text is written in a buffer matrix (oh, and it is shorter too, if I may boast about! ;-) https://code.sololearn.com/c4jTM83LzxF0/?ref=app
5th Nov 2017, 10:42 PM
Xavier Demaret
Xavier Demaret - avatar
0
your main error is main loop should run name length times not 8 times use a NxN matrix instead , it will be much simpler , check this out, just made it benefits of this way is now u can make anything like a box with ur name L shape with ur name X- box with ur name etc etc by just adding or removing few lines https://code.sololearn.com/cxZjC005fzp4/?ref=app
25th Oct 2017, 12:37 AM
Morpheus
Morpheus - avatar
0
may be it's time you choose ,the red pill or bluešŸ˜Ž
26th Oct 2017, 11:50 PM
Morpheus
Morpheus - avatar
0
magic is magic..
27th Oct 2017, 12:09 AM
kronos
kronos - avatar
- 1
@ Kronos, your next step should be to generalize this code for any name input. tips are -main loop will run n( name length in chars)times - L will be n*2 - m will be n that's it waiting for the generalized version of ur code
26th Oct 2017, 11:23 PM
Morpheus
Morpheus - avatar