#include <stdio.h> int main() { int n = 4521; int sum = 0; int t = 1000; while(n > 0){ sum += n % 10 * t; n /= 10; t /= 10; } printf("%d",sum); }
To embed this project on your website, copy the following code and paste it into your website's HTML: