Just press »F« on your keyboard to show your presentation in fullscreen mode. Press the »ESC« key to exit fullscreen mode.
Press "Esc" or "o" keys to toggle the overview mode on and off. While you're in this mode, you can still navigate between slides, as if you were at 1,000 feet above your presentation.
while(condition == true)
{
// Do some actions here if "condition == true"
// It will repeat actions if "condition == true"
}
int main()
{
int i = 3;
while (i > 0) { // 3 2 1
cout << i << endl;
i--; // i = i - 1;
}
cout << "Gotta Blast!" << endl;
}
int main() {
char str[100] = "";
cout << "Here is a Parrot, say something: ";
cin.getline(str, 100);
// strcmp = 0 - performs a case-sensitive comparison of two strings.
// stricmp = 0 - performs a non-case-sensitive comparison of two strings.
while (_stricmp(str, "bye") != 0 &&
_stricmp(str, "goodbye") != 0) {
cout << "- Parrot: " << str << endl;
cout << "- You: ";
cin.getline(str, 100);
}
cout << "- Parrot: Bye Bye, Goodbye!";
}
while(condition1 == true) // 1D
{
while(condition2 == true) // 2D
{
while(condition3 == true) // 3D
{
... // ToDo
}
}
}
do
{
// Do some actions here.
// It will make action first
// and only then will think repeat it
// in "while" if "condition == true"
// or not
}
while(condition == true)
while counter < 3:
pass
else:
pass
int i = 0;
while(i < 10)
{
std::cout << i << " ";
i++; // i = i + 1;
}
for(int i = 0; i < 10; i++) {
std::cout << i << " ";
}
for(int i = 0; i < 10; i++) {
std::cout << i << " ";
}
for x in range(10):
print(x)
for(int i = 5; i < 10; i++) {
std::cout << i << " ";
}
for x in range(5, 10):
print(x)
for(int i = 0; i < 10; i+=3) {
std::cout << i << " ";
}
for x in range(0, 10, 3):
print(x)
for (int i = 1; i <= 10; i++) {
std::cout << i << " ";
i = i * 2;
}
???
for(int i = 1; i <= 10; i++) {
if(i % 2 == 1)
i+=3;
if(names[i] == "John")
i+=3;
}
???
int main()
{
int myint[] = {1, 2, 3, 4, 5};
for (int i : myint)
{
std::cout << i << '\n';
}
}
foreach thought std
#include <iostream>
#include <algorithm> // contains std::for_each
#include <vector>
int main()
{
std::vector<int> v {1, 2, 3, 4, 5};
std::for_each(v.begin(), v.end(), [](int i)
{
std::cout << i << '\n';
});
std::cout << "reversed but skip 2 elements:\n";
std::for_each(v.rbegin()+2, v.rend(), [](int i)
{
std::cout << i << '\n';
});
}
for character in "Python":
print(character)
programming_languages = ["Python", "JavaScript", "Java", "C++"]
# ітерація над кожним елементом всередині списку
for language in programming_languages:
print(language)