Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- //1 for
- /*for (int a = 55; a <= 87; a++)
- {
- cout << a << endl;
- }*/
- //1 do while
- /*int a = 55;
- do
- {
- cout << a << endl;
- a++;
- }
- while (a <= 87);*/
- // 2 for
- /*for (int a = 0; a <= 101; a++)
- {
- cout << a << endl;
- a++;
- }*/
- // 2 do while
- /*int a;
- a = 0;
- do
- {
- cout << a << endl;
- a++;
- a++;
- } while (a <= 101);*/
- // 3 for
- /*for (int a = 200; 50 <= a; a--)
- {
- cout << a << endl;
- }*/
- // 3 do while
- /*int a;
- a = 200;
- do
- {
- cout << a << endl;
- a--;
- } while (50 <= a);*/
- // 4 for
- /*for (int a = 7; a <= 100; a++)
- {
- cout << a << endl;
- a++;
- }*/
- // 4 do while
- /*int a;
- a = 7;
- do
- {
- cout << a << endl;
- a++;
- a++;
- } while (a <= 100);*/
- //5 for
- /*for (int a = 0,b = 0; a <= 100; a++)
- {
- b += a;
- cout << b << endl;
- }*/
- // 5 do while
- /*int a, b;
- a = 0;
- b = 0;
- do
- {
- cout << b << endl;
- a++;
- b += a;
- } while (a <= 100);*/
- // 6 for
- /*int res,a,b,s;
- res = 1;
- s = 1;
- cin >> a;
- cin >> b;
- for (res = 1, s = 1; s <= b; s++)
- {
- res *= a;
- }
- cout << res << endl;*/
- // 6 do while
- /*int res, a, b, s;
- res = 1;
- s = 1;
- cin >> a;
- cin >> b;
- do
- {
- s++;
- res *= a;
- } while (s <= b);
- cout << res << endl;*/
- // 7 for
- /*for (int a = 1; a <= 9; a++)
- {
- cout << a << "*" << "7" << "=" << a * 7 << endl;
- }*/
- // 7 do while
- /*int a;
- a = 1;
- do
- {
- cout << a << "*" << "7" << "=" << a * 7 << endl;
- a++;
- } while (a <= 9);*/
- // 8 for
- /*long float b = 1;
- for (int a = 1; a <= 50; a++)
- {
- b *= a;
- cout << b << endl;
- }*/
- // 8 do while
- /*long float b = 1;
- int a = 1;
- do
- {
- b *= a;
- cout << b << endl;
- a++;
- } while (a <= 50);*/
- // 9 for
- /*for (int a = 1; a <= 20; a++)
- {
- cout << a << "detail count = " << a * 300 << endl;
- }*/
- // 9 do while
- /*int a;
- a = 1;
- do
- {
- cout << a << "detail count = " << a * 300 << endl;
- a++;
- } while (a <= 20);*/
- // 10 for
- /*int day, a = 1;
- cout << "Enter number day - " << endl;
- cin >> day;
- day = day % 7;
- for (;day > 7;day++)
- {
- day--;
- day = day - 7;
- }
- switch (day)
- {
- case 1:
- cout << "Monday" << endl;
- break;
- case 2:
- cout << "Tuesday" << endl;
- break;
- case 3:
- cout << "Wednesday" << endl;
- break;
- case 4:
- cout << "Thursday" << endl;
- break;
- case 5:
- cout << "Friday" << endl;
- break;
- case 6:
- cout << "Saturday" << endl;
- break;
- case 7:
- cout << "Sunday" << endl;
- break;
- default:
- cout << "Error" << endl;
- break;
- }*/
- // 10 do while
- /*int day;
- cout << "Enter number day - " << endl;
- cin >> day;
- day = day % 7;
- if (day > 7)
- {
- do
- {
- day = day - 7;
- } while (day > 7);
- }
- switch (day)
- {
- case 1:
- cout << "Monday" << endl;
- break;
- case 2:
- cout << "Tuesday" << endl;
- break;
- case 3:
- cout << "Wednesday" << endl;
- break;
- case 4:
- cout << "Thursday" << endl;
- break;
- case 5:
- cout << "Friday" << endl;
- break;
- case 6:
- cout << "Saturday" << endl;
- break;
- case 7:
- cout << "Sunday" << endl;
- break;
- default:
- cout << "Error" << endl;
- break;
- }*/
- //11 for
- /*int a,kop,grn;
- kop = 0;
- cout << "Enter money - ";
- cin >> a;
- for (grn = 0; a >= 100; grn++)
- {
- a -= 100;
- }
- kop = a % 100;
- cout << grn << " grn " << kop << " kop" << endl;*/
- //11 do while
- /*int a, kop, grn;
- grn = 0;
- kop = 0;
- cout << "Enter money - ";
- cin >> a;
- do
- {
- a -= 100;
- grn++;
- } while (a >= 100);
- kop = a % 100;
- cout << grn << " grn " << kop << " kop" << endl;*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement