Advertisement
pavlinpetkov88

adasd

Dec 12th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace encodedAnswers_oldExams
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. byte numberOfQuestions = byte.Parse(Console.ReadLine());
  14. uint answers;
  15. uint a = 0;
  16. uint b = 0;
  17. uint c = 0;
  18. uint d = 0;
  19. string answersBlank = "a ";
  20. string result = "";
  21.  
  22. for (int i = 1; i <= numberOfQuestions; i++)
  23. {
  24. answers = uint.Parse(Console.ReadLine());
  25.  
  26. if (answers % 4 == 0)
  27. {
  28. a++;
  29. answersBlank = "a ";
  30. }
  31. else if (answers % 4 == 1)
  32. {
  33. b++;
  34. answersBlank = "b ";
  35.  
  36. }
  37. else if (answers % 4 == 2)
  38. {
  39. c++;
  40. answersBlank = "c ";
  41.  
  42. }
  43. else
  44. {
  45. d++;
  46. answersBlank = "d ";
  47.  
  48. }
  49. result += answersBlank;
  50. }
  51.  
  52. Console.WriteLine("{0} ", result);
  53.  
  54. Console.WriteLine("Answer A: {0}", a);
  55. Console.WriteLine("Answer B: {0}", b);
  56. Console.WriteLine("Answer C: {0}", c);
  57. Console.WriteLine("Answer D: {0}", d);
  58.  
  59. }
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement