Advertisement
Guest User

leccia4.2

a guest
Sep 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 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 denisik_kisik
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12.  
  13.  
  14. {
  15. int Ball = 0;
  16. Console.Write(" x = ");
  17. float x = float.Parse(Console.ReadLine());
  18. Console.Write(" y = ");
  19. float y = float.Parse(Console.ReadLine());
  20. if (x * x + y * y <= 1) Ball = 10; //окружность с радиусом 1
  21. else if (x * x + y * y <= 4) Ball = 5; //окружность с радиусом 2
  22. else if (x * x + y * y <= 9) Ball = 1;
  23. Console.Write("BALL=" + Ball);
  24. }
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement