In this lecture, I present Control Structure of C ++ , I cover :
- Conditional control structures
- Examples of conditional control structures
- Complex conditions
- ASCII table
- Loops
- While loop with exercises
- Do/while loop with exercises
- For loop with exercises
- Break and Continue statements
- Exercises
In this lecture, I present Control Structure of C ++ , I cover :
- Conditional control structures
- Examples of conditional control structures
- Complex conditions
- ASCII table
- Loops
- While loop with exercises
- Do/while loop with exercises
- For loop with exercises
- Break and Continue statements
- Exercises
This set of slides introduces the reader to the concept of arrays in C++ (with elements of C++11 and C++14). After presenting the array data type, the concept of array-to-pointer decay is introduced. The presentation proceeds with a discussion on how to pass arrays to functions. To this extent, the reader is guided to the use of bounded ranges as the first step towards the use of the Standard Template Library (STL).
Features and highlights from Sirona hotels, Velingrad, presented at the Astral Holidays presentation during the 2017 Vakantsia & SPA Expo in Sofia, Bulgaria (in Bulgarian).
Pedido de audiência temática sobre a situação de retrocessos na garantia de d...Marco Zero Conteúdo
As organizações peticionárias deste documento solicitam à Comissão Interamericana de Direitos
Humanos uma audiência temática em face de medidas tomadas pelo governo brasileiro nos
últimos meses e de propostas que estão na iminência de serem aprovadas.
As medidas elencadas neste documento implicam graves retrocessos na promoção dos direitos
humanos e atingem diversos setores, entre os quais estão a saúde, educação, direito à comunicação
e liberdade de expressão e todo o sistema de garantias.
This set of slides introduces the reader to the concept of arrays in C++ (with elements of C++11 and C++14). After presenting the array data type, the concept of array-to-pointer decay is introduced. The presentation proceeds with a discussion on how to pass arrays to functions. To this extent, the reader is guided to the use of bounded ranges as the first step towards the use of the Standard Template Library (STL).
Features and highlights from Sirona hotels, Velingrad, presented at the Astral Holidays presentation during the 2017 Vakantsia & SPA Expo in Sofia, Bulgaria (in Bulgarian).
Pedido de audiência temática sobre a situação de retrocessos na garantia de d...Marco Zero Conteúdo
As organizações peticionárias deste documento solicitam à Comissão Interamericana de Direitos
Humanos uma audiência temática em face de medidas tomadas pelo governo brasileiro nos
últimos meses e de propostas que estão na iminência de serem aprovadas.
As medidas elencadas neste documento implicam graves retrocessos na promoção dos direitos
humanos e atingem diversos setores, entre os quais estão a saúde, educação, direito à comunicação
e liberdade de expressão e todo o sistema de garantias.
شرح مقرر البرمجة 2 لغة جافا - مادة النهائي
البرمجة الكينونية بلغة جافا - Java
اعداد: م. سالي عبد الله
كلية التكنولوجيا والعلوم التطبيقية
جامعة القدس المفتوحة
5. للعملية مثال:-
#include <iostream>
using namespace std;
int main () {
// Local variable declaration:
int a = 10;
// while loop execution
while( a < 20 ) {
cout << "value of a: " << a <<
endl;
a++;
}
return 0;
}
while loop :-
البرنامج نتيجة:-
value of a: 10
value of a: 11
value of a: 12
value of a: 13
value of a: 14
value of a: 15
value of a: 16
value of a: 17
value of a: 18
value of a: 19
البرنامج شرح:-
من االعداد لكتابة برنامج هو10الي19
كاالتي البرنامج قراءة وطريقة:-
بالمتغير مبتدأ البرنامج يقرأ سوفa=10الشرط وتحقق
a<20هل اذا10من اصغر20اطبع صحيح الشرط
القيمة=10ثمa++المتغ قيمة الي واحد إضافة وتعنيير
aوهي العملية يكرر ثمa=11هل11من اصغر20
القيمة اطبع صحيح الشرط11عدم الي يصل ان الي وهكذا
القي طباعة عن البرنامج ويتوقف الشرط صحة توفروهي مة
a=20هل20من اصغر20تقم ال صحيح غير الشرط
القيمة بطباعة.
7. البرنامج شرح:-
من االعداد بطباعة يقوم برنامج10الي
19:
المتغير بمعرفة من البرنامج يقومa =
10نتيجة حصل الشرط من ستحقق
بطباعة قوم صحيحةa = 10يعد ثم
بإضافة العدا دخول مع الكرة(10+1)
=11اطبه الشرط ستحققa = 11
اخره الي وهكذا...عند ويتوقف19وال
الي يكمل20لمذاال الن ؟20لتحقق
الشرط.
for loop:-
للعملية مثال:-
#include <iostream>
using namespace std;
int main ()
{
// for loop execution
for( int a = 10; a < 20; a = a + 1 )
{
cout << "value of a: " << a << endl;
}
return 0;
}
النتيجة:-
value of a: 10
value of a: 11
value of a: 12
value of a: 13
value of a: 14
value of a: 15
value of a: 16
value of a: 17
value of a: 18
value of a: 19
11. للعملية مثال:-
#include <iostream>
using namespace std;
int main () {
int i, j;
for(i = 2; i<100; i++) {
for(j = 2; j <= (i/j); j++)
if(!(i%j)) break; // if factor found, not prime
if(j > (i/j)) cout << i << " is primen";
}
return 0;
}
2 is prime
3 is prime
5 is prime
7 is prime
11 is prime
13 is prime
17 is prime
19 is prime
23 is prime
29 is prime
31 is prime
37 is prime
41 is prime
43 is prime
47 is prime
53 is prime
59 is prime
61 is prime
67 is prime
71 is prime
73 is prime
79 is prime
83 is prime
89 is prime
97 is prime
nested loops:-
13. Terminates the loop or switch statement and transfers execution to the statement immediately
following the loop or switch.
This explanation of the explanation will find on the following link: -
https://youtu.be/S6WkTenfEHk
break statement :-
14. Causes the loop to skip the remainder of its body and immediately retest its condition prior to
reiterating.
This explanation of the explanation will find on the following link: -
https://youtu.be/VYEhDnQ-2mE
continue statement:-
15. Transfers control to the labeled statement. Though it is not advised to use goto statement in
your program.
This explanation of the explanation will find on the following link: -
https://youtu.be/bwNKXac6TRI
goto statement:-