Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class TripleRotation
- {
- static void Main()
- {
- int number = int.Parse(Console.ReadLine());
- for (int i = 0; i < 3; i++)
- {
- if(number > 9)
- {
- int lastDigit = number % 10;
- number /= 10;
- string str = lastDigit.ToString() + number.ToString();
- number = int.Parse(str);
- }
- }
- Console.WriteLine(number);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment