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 encodedAnswers_oldExams
- {
- class Program
- {
- static void Main(string[] args)
- {
- byte numberOfQuestions = byte.Parse(Console.ReadLine());
- uint answers;
- uint a = 0;
- uint b = 0;
- uint c = 0;
- uint d = 0;
- string answersBlank = "a ";
- string result = "";
- for (int i = 1; i <= numberOfQuestions; i++)
- {
- answers = uint.Parse(Console.ReadLine());
- if (answers % 4 == 0)
- {
- a++;
- answersBlank = "a ";
- }
- else if (answers % 4 == 1)
- {
- b++;
- answersBlank = "b ";
- }
- else if (answers % 4 == 2)
- {
- c++;
- answersBlank = "c ";
- }
- else
- {
- d++;
- answersBlank = "d ";
- }
- result += answersBlank;
- }
- Console.WriteLine("{0} ", result);
- Console.WriteLine("Answer A: {0}", a);
- Console.WriteLine("Answer B: {0}", b);
- Console.WriteLine("Answer C: {0}", c);
- Console.WriteLine("Answer D: {0}", d);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement