Advertisement
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 ConsoleApplication2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("rok podaj");
- int year = int.Parse(Console.ReadLine());
- int pierwsza = year / 1000;
- int druga = (year - (pierwsza * 1000)) / 100;
- int trzecia = (year - (pierwsza * 1000 + druga * 100) )/10;
- int czwarta = year - (pierwsza * 1000 + druga * 100 + trzecia * 10);
- Console.WriteLine("podales "+pierwsza+""+druga+""+trzecia+""+czwarta);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement