Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n = 1986, temp = 0, dtemp = 0;
- cout << "Iveskite skaiciu : " ;
- cin >> n;
- while (n > 0){
- temp*=10;
- temp+= n % 10;
- temp = temp * 10 + n % 10;
- cout << temp << endl;
- n/=10;
- }
- while (temp > 0){
- dtemp*=10;
- dtemp+= temp % 10;
- temp/=10;
- }
- cout << dtemp;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement