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;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num, mone1 = 0, mone2 = 0;
- num = int.Parse(Console.ReadLine());
- for (; num > 0; num--)
- {
- if (num % 2 == 0)
- mone1++;
- else
- mone2++;
- }
- Console.WriteLine(mone1 + " " + mone2);
- Console.WriteLine(Math.Abs(mone2 - mone1));
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment