cpp:loops: Added while example

This commit is contained in:
Logen Kain 2017-05-13 19:24:46 -07:00
parent 724f05cbef
commit e0ce183060

13
cpp/loops/while.cpp Normal file
View File

@ -0,0 +1,13 @@
#include<iostream>
int main(){
int i = 50;
int total = 0;
while (i < 101){
total += i;
std::cout << i << " " << total << std::endl;
i++;
}
return 0;
}