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;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Malben(int x, int y)
- {
- int s, p, x2, y2, s2, p2;
- double alahson, alahson2;
- s = x * y;
- Console.WriteLine("Shetah = " + s);
- p = (x * 2) + (y * 2);
- Console.WriteLine("Oreh = " + p);
- alahson = Math.Sqrt(x * x + y * y);
- Console.WriteLine("Alahson = " + alahson);
- Console.WriteLine();
- for (int i = 1; i <= x; i++)
- {
- for (int j = 1; j <= y; j++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- }
- Console.WriteLine();
- x2 = x * 2;
- y2 = y + 3;
- s2 = x2 * y2;
- Console.WriteLine("Shetah = " + s2);
- p2 = (x2 * 2) + (y2 * 2);
- Console.WriteLine("Oreh = " + p2);
- alahson2 = Math.Sqrt(x2 * x2 + y2 * y2);
- Console.WriteLine("Alahson = " + alahson2);
- Console.WriteLine();
- for (int i = 1; i <= x2; i++)
- {
- for (int j = 1; j <= y2; j++)
- {
- Console.Write("*");
- }
- Console.WriteLine();
- }
- }
- static void Main(string[] args)
- {
- Console.WriteLine("Enter the X:");
- int x = int.Parse(Console.ReadLine());
- Console.WriteLine("Enter the Y:");
- int y = int.Parse(Console.ReadLine());
- Console.WriteLine();
- Malben(x, y);
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment