Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TripleDigitRotation
- {
- class TripleDigitRotation
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < 3; i++)
- {
- if(n>9)
- {
- int digit = n % 10;
- n = n / 10;
- string result = digit.ToString() + n.ToString();
- n = int.Parse(result);
- }
- }
- Console.WriteLine(n);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment