Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 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 ConsoleApp21
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int age = int.Parse(Console.ReadLine());
  14. double cenaPeralnq = double.Parse(Console.ReadLine());
  15. int cenaIgrachka = int.Parse(Console.ReadLine());
  16.  
  17. int evenRd = 0;
  18. int oddRd = 0;
  19. double money = evenRd + oddRd;
  20.  
  21. double ostatyk = Math.Round((money - cenaPeralnq), 2);
  22.  
  23. for (int i = 1; i <= age; i++)
  24. {
  25. if (i%2==0)
  26. {
  27. evenRd = (i * 10) / 2 - i;
  28. }
  29. else
  30. {
  31. oddRd = cenaIgrachka * (age / 2);
  32. }
  33. }
  34.  
  35.  
  36.  
  37.  
  38.  
  39. }
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement