cpp:loops: Added for example
This commit is contained in:
parent
e0ce183060
commit
dc6fbd67ed
12
cpp/loops/for.cpp
Normal file
12
cpp/loops/for.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include<iostream>
|
||||
|
||||
int main(){
|
||||
int i;;
|
||||
int total = 0;
|
||||
|
||||
for (i = 50; i < 101; i++){
|
||||
total += i;
|
||||
std::cout << i << " " << total << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user