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 ConsoleApplication5
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = 0, y = 0, d = 0 , votes = 0;
- char tav;
- tav = char.Parse(Console.ReadLine());
- while (tav != (char)'n' || tav != (char)'y' || tav != (char)'d')
- {
- tav = char.Parse(Console.ReadLine());
- }
- while (tav != (char)'f')
- {
- if (tav != (char)'n')
- {
- n++;
- votes++;
- }
- if (tav != (char)'y')
- {
- y++;
- votes++;
- }
- if (tav != (char)'d')
- {
- d++;
- votes++;
- }
- while (tav != (char)'n' || tav != (char)'y' || tav != (char)'d' || tav != (char)'f')
- {
- tav = char.Parse(Console.ReadLine());
- }
- if ((votes / 100 * y) >= 60)
- {
- Console.Write("yes");
- }
- else
- {
- Console.Write("no");
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment