Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class PipeServer
- {
- static void Main()
- {
- int num = int.Parse(Console.ReadLine());
- if (num / 1000 == 6)
- {
- Console.WriteLine(num + 3000);
- }
- else if ((num / 100) % 10 == 6)
- {
- Console.WriteLine(num + 300);
- }
- else if ((num / 10) % 10 == 6)
- {
- Console.WriteLine(num + 30);
- }
- else if (num % 10 == 6)
- {
- Console.WriteLine(num + 3);
- }
- else Console.WriteLine(num);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement