+ 2
(SOLVED) Whats wrong with this code, guys? The "output" is in the comment of the link below
14 ответов
+ 2
line 59: s = 1 ? i assume that if youre working later on it it may be a problem. also where is the output?
+ 2
what is clrscr?
+ 2
and strrev??
+ 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?
+ 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.
+ 1
clear screen Sir
+ 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. :)
+ 1
strrev = string reverse, for palindrome, Sir
+ 1
also start table -[] from 0 and not 1 tho, you may miss a character
+ 1
I am not sure about the 'scanf' but its purpose is reading the numbers
+ 1
where should I put the '0' Sir?
+ 1
sorry, didnt have time to respond. how did ya solve it?
+ 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
+ 1
look at the code now.. I revised it.. thanks to @Andres04_ve he helped me adding additional code for it to run