10.
String^ qator = Console::ReadLine();
11.
Single X,Y,Z; // satr turidagi o‘zgaruvchini songa o‘tkazish
12.
X = Single::Parse(qator); // Ikkinchi sonni o‘qib olish
13.
Console::WriteLine("Ikkinchi sonni kiriting:");
14.
qator = Console::ReadLine();
15.
Y = Single::Parse(qator);// Yig‘indini hisoblash
16.
Z = X + Y;
17.
Console::WriteLine("Yig'indi:{0}+{1}={2}", X, Y, Z);
// 0.5 sеkund 1000 Gs chastotali ovozli signal chiqarish
18.
Console::Beep(1000, 500); Console::ReadKey(); _getch(); }
Ushbu dasturda main() – bajarilishi birinchi bo‘lib boshlanadigan
nuqta. Odatda konsol ilovalar qora fonli oynada bajariladi. Konsol
ilovasining doimiy qora fonli oynasini boshqa rangga o‘zgartirish uchun
Do'stlaringiz bilan baham: |