Flowchart (ISO 5807)
Source code
C++
bool isPalindrome(int n) {
int rev = 0;
int t = n;
while (t > 0) {
rev = rev * 10 + t % 10;
t /= 10;
}
return rev == n;
}The editor opens with this code — change it and the chart redraws.
- Language
- C++
- Constructs
- reversing a number
- Topic
- Algorithms
- Formats
- Word, Visio, draw.io, PDF, SVG