X-88

deret

Dec 2nd, 2021
783
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int i, x = 0, m = 5;
  5. int main()
  6. {
  7. for (i = 1; i <= m; i++)
  8. {
  9.     x += i;
  10. if (i < m)
  11.     cout << i << " + ";
  12. else
  13.     cout << i << " = " << x << endl;
  14. }
  15.     return 0;
  16. }
RAW Paste Data