using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication68
{
class Program
{
static void Main(string[] args) //عمل الطالب خلدون عصفور
{
int a; // حساب الباقي
int b;
int c;
Console.WriteLine(" enter the first num");
a = int.Parse(Console.ReadLine());
Console.WriteLine(" enterthe second num");
b = int.Parse(Console.ReadLine());
c = a%b;
Console.WriteLine( "The rest is" + c);
Console.ReadKey();
}
}
}
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication68
{
class Program
{
static void Main(string[] args) // عمل الطالب خلدون عصفور
{
string name;// برمجة حساب مساحة ومحيط المستطيل
int Width;
int Length;
int a;
int d;
Console.WriteLine(" Please enter your name?");
name = Console.ReadLine();
Console.WriteLine(" For Rectangle please enter Width");
Width = int.Parse(Console.ReadLine());
Console.WriteLine(" For the same Rectangle please enter Length");
Length = int.Parse(Console.ReadLine());
a = Width * Length;
d = Width * 2 + Length * 2;
Console.WriteLine(" Mr " + name + " The area of the rectangle with length of " + Length + " and width of " + Width + " is " + a);
Console.WriteLine(" Mr " + name + " The Circumference of the rectanagle is " + d);
Console.ReadKey();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication68
{
class Program
{
static void Main(string[] args) // عمل الطالب خلدون عصفور
{
string name;// برمجة حساب مساحة ومحيط
int r;
double a;
double d;
double b = 3.14;
Console.WriteLine(" Please enter your name?");
name = Console.ReadLine();
Console.WriteLine(" Please enter radius of the circle");
r= int.Parse(Console.ReadLine());
a = (r*r)* b ;
d = r*2*b;
Console.WriteLine(" Mr "+ name +" The area of the circle is "+ a + " and the Circumference is " + d);
Console.ReadKey();
}
}
}
ليست هناك تعليقات:
إرسال تعليق