Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. //int main()
  5. //{
  6. // int a, b, i, j;
  7. // cout << "Podaj a: ";
  8. // cin >> a;
  9. // cout << "Podaj b: ";
  10. // cin >> b;
  11. // for (i = a; i <= b; i++){
  12. // for (j = a; j <= b; j++)
  13. // {
  14. // cout << j << "\t";
  15. // }
  16. // cout << endl;
  17. // cout << i+1 << "\t";
  18. // for (int k = a+1; k <= b; k++){
  19. // cout << k * k << "\t";
  20. // }
  21. // cout << endl;
  22. // j++;
  23. // }
  24. //}
  25.  
  26. //int main()
  27. //{
  28. // int a,b,c;
  29. // while (345345345)
  30. // {
  31. // cout << "Wybierz polecenie: " << endl << "Oblicz: " << endl << "1) Pole powierzchni prostokata" << endl << "2) Obwod prostokata" << endl << "3) Obwod okregu" << endl << "4) Pole powierzchni kola" << endl;
  32. // cin >> a;
  33. // if (a == 5)
  34. // break;
  35. // switch (a)
  36. // {
  37. // case 1:
  38. // cout << "Podaj dlugosci bokow: ";
  39. // cin >> b >> c;
  40. // cout << "Pole to: " << b * c;
  41. // break;
  42. //
  43. //
  44. // default:
  45. // cout << "Blad!! Wybierz liczbe od 1 do 4 ";
  46. // }
  47. // }
  48. // cout << "Wyszedlem";
  49. //}
  50.  
  51. //int main()
  52. //{
  53. // cout << "Podaj 3 liczby: ";
  54. // int a, b, c;
  55. // cin >> a >> b >> c;
  56. // cout << "Najwieksza liczba to: ";
  57. // if ((a > b) & (a > c))
  58. // cout << a;
  59. // else if ((b > a) & (b > c))
  60. // cout << b;
  61. // else if ((c>a) & (c>b))
  62. // cout << c;
  63. // else
  64. // cout << "chuj";
  65. //}
  66.  
  67. int main()
  68. {
  69. int N;
  70. cout << "Podaj n: ";
  71. cin >> N;
  72. while (1) {
  73. if (N < 1) {
  74. cout << "Podaj n wieksze od 1: ";
  75. cin >> N;
  76. }
  77. else
  78. break;
  79. }
  80.  
  81. for (int i = 1; i <= N; i++)
  82. {
  83. for (int j = 1; j <= i; j++)
  84. cout << '*';
  85. cout << endl;
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement