Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6. int cos = 1;
  7. for (int i = 0; i < 10; i++){
  8. cout << cos <<endl;
  9. cos += 7;
  10. }
  11. }
  12.  
  13.  
  14. #include <iostream>
  15.  
  16. using namespace std;
  17. int main()
  18. {
  19.  
  20. long long iloczyn = 1;
  21. for (int i = 2; i <= 30; i++){
  22. if(i%3 == 0){
  23. iloczyn *= i;
  24. }
  25. }
  26. cout << iloczyn << endl;
  27. }
  28.  
  29. #include <iostream>
  30.  
  31. using namespace std;
  32. int main()
  33. {
  34. int start = 0;
  35. int koniec = 0;
  36.  
  37. cout << "Podaj start" <<endl;
  38. cin >> start;
  39.  
  40. cout << "Podaj koniec" <<endl;
  41. cin >> koniec;
  42. for(int i=start; i <= koniec; i++){
  43. cout << i <<endl;
  44. }
  45. }
  46.  
  47.  
  48. #include <iostream>
  49.  
  50. using namespace std;
  51. int main()
  52. {
  53. int liczba = 0;
  54. int suma = 0;
  55. for (int i = 0; i < 10; i++){
  56. cout << "Podaj liczbe dwucyfrowa" <<endl;
  57. cin >> liczba;
  58. if (liczba > 9 && liczba < 100){
  59. suma += liczba;
  60. } else {
  61. i--;
  62. cout << "To nie jest liczba dwucyfrowa" <<endl;
  63. }
  64. }
  65. cout << suma <<endl;
  66. }
  67.  
  68.  
  69.  
  70. #include <iostream>
  71.  
  72. using namespace std;
  73. int main()
  74. {
  75. int liczba;
  76. while (liczba <= 1000){
  77. cout << "Podaj liczbe " <<"";
  78. cin >> liczba;
  79. }
  80. cout << "Podano wiecej niz 1000! " <<endl;
  81.  
  82.  
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement