YannickF

InformatikHÜ_20.02.2019

Feb 20th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. Programm:
  2.  
  3. #include "pch.h"
  4. #include <iostream>
  5. using namespace std;
  6. int main()
  7. {
  8. cout << "Aufgabe 1: \n\n";
  9.  
  10. int j, x = 1;
  11.  
  12. for (int i = 10; i <= 16; i++) {
  13. cout << "Durchlauf " << x << endl;
  14. i = i + 3;
  15. j = (i * 3) + 1;
  16. cout << i << " " << j << "\n";
  17. x++;
  18. }
  19.  
  20. cout << "\n\nAufgabe 2: \n\n";
  21.  
  22. int m, p;
  23.  
  24. for (int i = 1; i <= 4; i++) {
  25. cout << "Durchlauf " << i << endl;
  26. m = i * 2;
  27. p = m + 1;
  28. cout << p << endl;
  29. for (int k = 0; k < 3; k++) {
  30. cout << i << " " << m << " " << k << "\n";
  31. }
  32. }
  33.  
  34. cout << "\n\nAufgabe 3: \n\n";
  35.  
  36. int q = 500;
  37.  
  38. do {
  39. cout << q << endl;
  40. q++;
  41. } while (q <= 524);
  42.  
  43. cout << "\n\nAufgabe 4: \n\n";
  44.  
  45. int r = 500;
  46.  
  47. while (r <= 524) {
  48. cout << r << endl;
  49. r++;
  50. }
  51. }
  52.  
  53. ------------------------------------------------------------------------------------------------------------------------------------------
  54. Konsole:
  55.  
  56. Aufgabe 1:
  57.  
  58. Durchlauf 1
  59. 13 40
  60. Durchlauf 2
  61. 17 52
  62.  
  63.  
  64. Aufgabe 2:
  65.  
  66. Durchlauf 1
  67. 3
  68. 1 2 0
  69. 1 2 1
  70. 1 2 2
  71. Durchlauf 2
  72. 5
  73. 2 4 0
  74. 2 4 1
  75. 2 4 2
  76. Durchlauf 3
  77. 7
  78. 3 6 0
  79. 3 6 1
  80. 3 6 2
  81. Durchlauf 4
  82. 9
  83. 4 8 0
  84. 4 8 1
  85. 4 8 2
  86.  
  87.  
  88. Aufgabe 3:
  89.  
  90. 500
  91. 501
  92. 502
  93. 503
  94. 504
  95. 505
  96. 506
  97. 507
  98. 508
  99. 509
  100. 510
  101. 511
  102. 512
  103. 513
  104. 514
  105. 515
  106. 516
  107. 517
  108. 518
  109. 519
  110. 520
  111. 521
  112. 522
  113. 523
  114. 524
  115.  
  116.  
  117. Aufgabe 4:
  118.  
  119. 500
  120. 501
  121. 502
  122. 503
  123. 504
  124. 505
  125. 506
  126. 507
  127. 508
  128. 509
  129. 510
  130. 511
  131. 512
  132. 513
  133. 514
  134. 515
  135. 516
  136. 517
  137. 518
  138. 519
  139. 520
  140. 521
  141. 522
  142. 523
  143. 524
Advertisement
Add Comment
Please, Sign In to add comment