Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Programm:
- #include "pch.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Aufgabe 1: \n\n";
- int j, x = 1;
- for (int i = 10; i <= 16; i++) {
- cout << "Durchlauf " << x << endl;
- i = i + 3;
- j = (i * 3) + 1;
- cout << i << " " << j << "\n";
- x++;
- }
- cout << "\n\nAufgabe 2: \n\n";
- int m, p;
- for (int i = 1; i <= 4; i++) {
- cout << "Durchlauf " << i << endl;
- m = i * 2;
- p = m + 1;
- cout << p << endl;
- for (int k = 0; k < 3; k++) {
- cout << i << " " << m << " " << k << "\n";
- }
- }
- cout << "\n\nAufgabe 3: \n\n";
- int q = 500;
- do {
- cout << q << endl;
- q++;
- } while (q <= 524);
- cout << "\n\nAufgabe 4: \n\n";
- int r = 500;
- while (r <= 524) {
- cout << r << endl;
- r++;
- }
- }
- ------------------------------------------------------------------------------------------------------------------------------------------
- Konsole:
- Aufgabe 1:
- Durchlauf 1
- 13 40
- Durchlauf 2
- 17 52
- Aufgabe 2:
- Durchlauf 1
- 3
- 1 2 0
- 1 2 1
- 1 2 2
- Durchlauf 2
- 5
- 2 4 0
- 2 4 1
- 2 4 2
- Durchlauf 3
- 7
- 3 6 0
- 3 6 1
- 3 6 2
- Durchlauf 4
- 9
- 4 8 0
- 4 8 1
- 4 8 2
- Aufgabe 3:
- 500
- 501
- 502
- 503
- 504
- 505
- 506
- 507
- 508
- 509
- 510
- 511
- 512
- 513
- 514
- 515
- 516
- 517
- 518
- 519
- 520
- 521
- 522
- 523
- 524
- Aufgabe 4:
- 500
- 501
- 502
- 503
- 504
- 505
- 506
- 507
- 508
- 509
- 510
- 511
- 512
- 513
- 514
- 515
- 516
- 517
- 518
- 519
- 520
- 521
- 522
- 523
- 524
Advertisement
Add Comment
Please, Sign In to add comment