VPanev

Untitled

Nov 27th, 2021
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. namespace ConsoleApp1
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. int score = int.Parse(Console.ReadLine());
  12.  
  13. if (score <= 0 || score > 9)
  14. {
  15. Console.WriteLine("invalid score");
  16. }
  17. else
  18. {
  19. if (score >= 1 && score <= 3)
  20. {
  21. Console.WriteLine(score * 10);
  22. }
  23. else if (score >= 4 && score <= 6)
  24. {
  25. Console.WriteLine(score * 100);
  26. }
  27. else if (score >= 7 && score <= 9)
  28. {
  29. Console.WriteLine(score * 1000);
  30. }
  31. }
  32. }
  33. }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment