Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Prostokat
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a;
- int b;
- string imie;
- Console.WriteLine("podaj imie: ");
- imie = Console.ReadLine();
- Console.Write("podaj dlugosc boku a: ");
- a = int.Parse(Console.ReadLine());
- Console.Write("podaj dlugosc boku b: ");
- b = int.Parse(Console.ReadLine());
- int pole = a * b;
- int obwod = a * 2 + b * 2;
- Console.Clear();
- Console.WriteLine($"{imie}, oto twoje wyniki.\n");
- Console.WriteLine($"pole tego prostokata wynosi {pole}");
- Console.WriteLine($"obwod tego prostokata wynosi {obwod}");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement