Guest User

Untitled

a guest
Mar 6th, 2018
174
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 lecture_selary
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var lectures = int.Parse(Console.ReadLine());
  14. var budjet = double.Parse(Console.ReadLine());
  15. string names;
  16. double price = 0;
  17. for (int i = 0; i < lectures; i++)
  18. {
  19. names = Console.ReadLine();
  20. price = lectures / budjet;
  21. if (names == "Jelev salary:")
  22. {
  23. Console.WriteLine($"Jelev salary{price:f2}");
  24. }
  25. else if (names== "RoYaL salary:")
  26. {
  27. Console.WriteLine($"RoYaL salary:{price:f2}");
  28. }
  29. else if (names == "Roli salary:")
  30. {
  31. Console.WriteLine($"Roli salary:{price:f2}");
  32. }
  33. else if (names == "Trofon salary:")
  34. {
  35. Console.WriteLine($"Trofon salary:{price:f2}");
  36. }
  37. else if (names == "Sino salary:")
  38. {
  39. Console.WriteLine($"Sino salary:{price:f2}");
  40. }
  41. else if (names == "Others salary:")
  42. {
  43. Console.WriteLine($"Others salary:{price:f2}");
  44. }
  45.  
  46.  
  47. }
  48.  
  49.  
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment