Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Disk
- {
- class Disk
- {
- static void Main()
- {
- int fieldSize = int.Parse(Console.ReadLine());
- int radius = int.Parse(Console.ReadLine());
- for (int i = 1; i <= fieldSize; i++)
- {
- for (int j = 1; j <= fieldSize; j++)
- {
- if (Math.Pow(i - fieldSize/2-1,2) + Math.Pow(j - fieldSize/2-1,2) <= Math.Pow(radius,2))
- {
- Console.Write("*");
- }
- else
- {
- Console.Write(".");
- }
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment