Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace denisik_kisik
- {
- class Program
- {
- static void Main(string[] args)
- {
- int Ball = 0;
- Console.Write(" x = ");
- float x = float.Parse(Console.ReadLine());
- Console.Write(" y = ");
- float y = float.Parse(Console.ReadLine());
- if (x * x + y * y <= 1) Ball = 10; //окружность с радиусом 1
- else if (x * x + y * y <= 4) Ball = 5; //окружность с радиусом 2
- else if (x * x + y * y <= 9) Ball = 1;
- Console.Write("BALL=" + Ball);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement