Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user will enter a number. The program should generate a ladder of X wherein the level depends on the number entered and the character should dictate whether it faces right or left. Sample: Character is r Number is 3 Output: X XX XXX Problem statement: Using loop, write a program that will ask the user to enter a character for left or right. Then, the user will enter a number. The program should generate a ladder of X wherein the level depends on the number entered and the character should dictate whether it faces right or left. Sample: Character is r Number is 3 Output: X XX XXX @Computer Science
what language?
C++
Please reply T_T I have no idea
One moment I am just writing it on some other site
Thanks :D
so if character = l and number = 3. would it look like: X XX XXX
Yes :)
Alright I'm porting my code into C++, managed to get that 'l' working
Thanks :D
I'm not an expert on C++, so I don't know if a C++ standard toupper function/method exists, and I used the one from C's standard library :-P anyway it works well.
Thanks dude! It worked XD
It goes crazy when you enter a character for a number though :P
Join our real-time social learning platform and learn together with your friends!