Advertisement
Josif_tepe

Untitled

May 21st, 2024
780
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int a, b;
  7.     a = 0;
  8.     b = 2;
  9.     do  
  10.     {
  11.         b = b + a;
  12.         a++;
  13.     } while(b > 2);
  14.     cout << a << endl;
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement