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