مرحبا جميعاً
سويت كودات لبرنامج استخدم فيها طريقة array
هو يتكلم عن area codeوكم يطلع per-minute per rate
الكودات جاهزه بس بغيت احد يحطها بالبرنامج لان البرنامج معلق معي !
using system ;
public class ChatAWhile
{
public static vod Main( )
{
int[ ] Code = { 262, 414, 608, 715, 815, 920 };
double[ ] Rate = { 0.07, 0.10, 0.05, 0.16, 0.24, 0.14 };
int AreaCode;
Console.Write("Please enter the area code : ");
AreaCode = Console.ReadLine();
Console.WriteLine("Number of elements: {0}", Code.Length);
for (int index = 0; index < Code.Length; index++)
if (AreaCode == Code[index])
{
Console.WriteLine("The rate per minute for {o) is {1} ("c") ", Code[index], Rate[index]);
return;
}
Console.WriteLine(" The area code {0} was not found!", AreaCode);
}
}
وبرضو ملف الكودات في المرفقات = )