Microsoft Visual C++/cli step by Step


   Microsoft Visual C++/CLI Step by Step



Download 2,23 Mb.
Pdf ko'rish
bet76/102
Sana31.12.2021
Hajmi2,23 Mb.
#228061
1   ...   72   73   74   75   76   77   78   79   ...   102
Bog'liq
Visual studio C step by step

76  

Microsoft Visual C++/CLI Step by Step

To

Do this

Perform iteration by using the for loop.

Use the for keyword followed by a pair of parentheses. 

Within the parentheses, define an initialization expres-

sion, followed by a test expression, followed by an update 

expression. Use semicolons to separate these expressions. 

For example:

for (int n = 10; n >= 0; n--)  

    Console::WriteLine(n);  



}

Perform iteration by using the do-while loop.

Use the do keyword, followed by the loop body, followed 

by the while keyword and the test condition. Terminate 

the loop with a semicolon. For example:

int n;  


do  

    String^ input = Console::ReadLine();  



    n = Convert::ToInt32(input);  

} while (n > 100);

Terminate a loop prematurely.

Use the break statement inside any loop. For example:

for (int n = 0; n < 1000; n++)  

    int square = n * n;  



    if (square > 3500)  

    {  


        break;  

    }  


    Console::WriteLine(square);  

}

Abandon a loop iteration and continue with the next 



iteration.

Use the continue statement inside any loop. For example:

for (int n = 0; n < 1000; n++)  

    int square = n * n;  



    if (square % 2 == 0)  

    {  


        continue;  

    }  


    Console::WriteLine(square);  

}




Download 2,23 Mb.

Do'stlaringiz bilan baham:
1   ...   72   73   74   75   76   77   78   79   ...   102




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish