I get 3 out of 6 in code coach https://code.sololearn.com/cEk5CxqIUr9M/?ref=app
11/29/2020 7:39:10 AM
🤴🌹Cute Princess 🌹💐7 Answers
New Answer1. In function Ispalindrome() there is no need to statement scanf (no need to enter any number again) 2. And there must be return statement of function . That returns true or false. i made some chnges in your code. i hope this will help you. https://code.sololearn.com/c6s11CkxV6BH/?ref=app
You not using int x parameter value, and not returning Boolean value beacuse your return type is bool. So i am added one variable "temp" And storing value of x and comparing that value to reverse number Value. Otherwise all things are right 👍👍. All the Best 👍. https://code.sololearn.com/c4VnEat6b1S2/?ref=app
1. Remove line 7 and 8 after that and assign num=x 2. After the while loop add if statement to check rev is equal to x .If yes return true else return false. And int n not required inside function. For explanation see BEGGINER answers
Your function is type of bool it's take only true and false valu not any int You need to change that either wish try to simple way ☺️
Learn Playing. Play Learning
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message