tgoop.com/cplus2/43
Last Update:
using System;
namespace yahya
{
class esmail
{
struct person
{
public string name;
public int age;
}
static void Main()
{
#region pro
/*
Console.WriteLine("Enter your name:");
string name = Console.ReadLine();
Console.WriteLine("YOUR NAME IS:" + name);
Console.Write("ENTER YOUR AGE :");
int age = int.Parse(Console.ReadLine());
Console.WriteLine("AGE=" + age);*/
#endregion
#region cond
/*
Console.WriteLine("enter the value for a:");
int a = int.Parse(Console.ReadLine());
Console.WriteLine("enter the value for b:");
int b = int.Parse(Console.ReadLine());
string cond = (a > b) ? "the value a=": "the valueb=b";
Console.WriteLine("the value cond="+ cond);
*/
#endregion
#region for
/*
for (int i = 1; i < 10; i++)
{
for (int j = 1; j < 10; j++)
Console.WriteLine("the result= " + i * j);
Console.WriteLine("\t");*/
#endregion
#region while
/*
int i = 0;
do
{
Console.WriteLine("yahya");
i++;
} while (i < 5);
while (i < 10)
{
Console.WriteLine("yahya");
i++;
}
*/
#endregion
#region EVEN OR NOT
/*
ASK: Console.WriteLine("Enter the number :");
int num= int.Parse(Console.ReadLine());
while (num % 2 != 0)
{
Console.WriteLine("THE NUMBER IS NOT EVEN:");
goto ASK;
}
Console.WriteLine("THE NUMBER IS EVEN ="+num);
*/
#endregion
#region arry
/*
int[] number= new []{ 1,17,10,11,5,6,7,8,9};
for (int i = 0; i < number.Length; i++)
{
Console.WriteLine(number[i]);
}
Console.WriteLine("THE LENGTH = "+number.Length);
Console.WriteLine("the indeex of number = " + Array.IndexOf(number, 7));
Array.Sort(number);
Array.Reverse(number);
for (int i = 0; i < number.Length; i++)
{
Console.WriteLine(number[i]);
}*/
#endregion
#region array2
/*int[,] arr = new int[3, 3] { { 1, 2, 3 }, { 4, 6, 7 }, { 8, 9, 5 } };
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
if(i==1&&j==1)
Console.Write("y");
else
Console.Write("*");
Console.WriteLine();
}*/
#endregion
#region arry sum
/*
int[] arr = { 2, 3, 4, 5, 6 ,5};
int sum = 0;
for (int i = 0; i < arr.Length; i++)
sum += arr[i];
Console.WriteLine("the sum=" + sum);
*/
#endregion
#region foreach
/*
int[] arr = { 2, 3, 4, 5 };
foreach (int i in arr)
Console.WriteLine(i);*/
#endregion
#region
/*
person p = new person();
Console.WriteLine("Enter your name ! ");
p.name = Console.ReadLine();
Console.WriteLine("Enter your age ! ");
p.age = int.Parse(Console.ReadLine());
Console.WriteLine("your name is :" + p.name +" and your age is: " + p.age);
*/
#endregion
Console.Read();
}
}
}
BY قناة تعلم لغة سي شارب برمجة تصميم واجهات سي بلس بلس جافا سكربت تطبيقات شروحات بي دي اف
Share with your friend now:
tgoop.com/cplus2/43