Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "std_lib_facilities.h"
- int square(int main_input)
- {
- int var_copy = 0;
- int static_copy = main_input;
- int i = 0;
- while (i < static_copy)
- {
- if (i > 0)
- {
- var_copy = static_copy;
- }
- main_input = main_input + var_copy;
- i++;
- }
- return main_input;
- }
- int main()
- {
- for (int i = 0; i < 100; i++)
- {
- cout << i << " " << square(i) << "\n";
- }
- cout << "\n";
- keep_window_open();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement