//naseem برنامج يقيس مساحة ومحيط المستطيل
int l;
int w;
int area;
string name;
int cicumference;
//asks for name
Console.WriteLine("enter your name");
name = Console.ReadLine();
Console.WriteLine("please enter leagth");
l = int.Parse(Console.ReadLine());
Console.WriteLine("please enter width");
w = int.Parse(Console.ReadLine());
area = l * w;
cicumference = (l + w) * 2;
Console.WriteLine("mr " + name);
Console.Write(" the area of the rectangle with leagth of " + l);
Console.Write(" and width of " + w);
Console.WriteLine(" is " + area);
Console.WriteLine("mr " + name);
Console.Write(" the cicumference of the rectangle is " + cicumference);
Console.ReadKey();
int l;
int w;
int area;
string name;
int cicumference;
//asks for name
Console.WriteLine("enter your name");
name = Console.ReadLine();
Console.WriteLine("please enter leagth");
l = int.Parse(Console.ReadLine());
Console.WriteLine("please enter width");
w = int.Parse(Console.ReadLine());
area = l * w;
cicumference = (l + w) * 2;
Console.WriteLine("mr " + name);
Console.Write(" the area of the rectangle with leagth of " + l);
Console.Write(" and width of " + w);
Console.WriteLine(" is " + area);
Console.WriteLine("mr " + name);
Console.Write(" the cicumference of the rectangle is " + cicumference);
Console.ReadKey();
تعليقات
إرسال تعليق