diff --git a/cpp/loops/for.cpp b/cpp/loops/for.cpp new file mode 100644 index 0000000..d948ecf --- /dev/null +++ b/cpp/loops/for.cpp @@ -0,0 +1,12 @@ +#include + +int main(){ + int i;; + int total = 0; + + for (i = 50; i < 101; i++){ + total += i; + std::cout << i << " " << total << std::endl; + } + return 0; +}