Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. int OnInit()
  2. {
  3. //---
  4. int i = 0;
  5. int sum = 0;
  6. string str = "";
  7. for ( i = 1; i <= 10; i++)
  8. {
  9. sum = sum + i;
  10. if ( i != 1 )
  11. str = str +" + "+ IntegerToString(i);
  12. else
  13. str = IntegerToString(i);
  14. Print(str + " = " + sum);
  15. }
  16. //---
  17. return(INIT_SUCCEEDED);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement