+ 2

(SOLVED) Whats wrong with this code, guys? The "output" is in the comment of the link below

https://code.sololearn.com/cm7Q9U2g7Wb6/?ref=app

9th Aug 2017, 2:58 PM
Zato
Zato - avatar
14 Answers
+ 2
line 59: s = 1 ? i assume that if youre working later on it it may be a problem. also where is the output?
9th Aug 2017, 3:06 PM
Paul
+ 2
what is clrscr?
9th Aug 2017, 3:18 PM
Paul
+ 2
and strrev??
9th Aug 2017, 3:24 PM
Paul
+ 2
after deleting those two the diamond is there but i didnt type anything tho v: is there an alternative of scanf? or does it let you type all things?
9th Aug 2017, 3:33 PM
Paul
+ 1
Enter Word: Noon Total Characters: 4 Palindrome: Yes 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1 this should be the output.
9th Aug 2017, 3:13 PM
Zato
Zato - avatar
+ 1
clear screen Sir
9th Aug 2017, 3:22 PM
Zato
Zato - avatar
+ 1
the clrscr is not really necessary. its only purpose is to make the output clear 'diamond shape numbers'. you can delete 'clrscr', Sir if you want. :)
9th Aug 2017, 3:29 PM
Zato
Zato - avatar
+ 1
strrev = string reverse, for palindrome, Sir
9th Aug 2017, 3:31 PM
Zato
Zato - avatar
+ 1
also start table -[] from 0 and not 1 tho, you may miss a character
9th Aug 2017, 3:37 PM
Paul
+ 1
I am not sure about the 'scanf' but its purpose is reading the numbers
9th Aug 2017, 3:46 PM
Zato
Zato - avatar
+ 1
where should I put the '0' Sir?
9th Aug 2017, 3:52 PM
Zato
Zato - avatar
+ 1
sorry, didnt have time to respond. how did ya solve it?
9th Aug 2017, 7:27 PM
Paul
+ 1
when i said table earlier i mean an array cause they stsrts from 0, not 1 but i can see code reading from. [1] which is a second position
9th Aug 2017, 10:07 PM
Paul
+ 1
look at the code now.. I revised it.. thanks to @Andres04_ve he helped me adding additional code for it to run
10th Aug 2017, 3:02 AM
Zato
Zato - avatar