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 ConsoleApp37
- {
- class Program
- {
- static void Main(string[] args)
- {
- int Participants = int.Parse(Console.ReadLine());
- int First = int.Parse(Console.ReadLine());
- var Second = First - (First * 0.20);
- var Third = Second - (Second * 0.10);
- var Sum = Math.Truncate(First + Second + Third);
- var Half = Participants / 2;
- var VotesNeeded = Math.Truncate(Math.Abs(Half - Sum));
- if (Sum >= Half)
- {
- Console.WriteLine($"First three languages have {VotesNeeded} votes more");
- }
- else if (Sum < Half)
- {
- Console.WriteLine($"First three languages have {VotesNeeded} votes less of half votes");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement