Q&A Discussies
what have i to do, if i want that the program always writes for example :
0+1
1+2
3+3
6+4
10+5
15+6
...
because now it just writes
1
3
6
10
15
...
and maybe if it works, can i make then
0+1=1
1+2=3
3+3=6
6+4=10
#include <iostream>
using namespace std;
int main(){
int i;
int sum = 0;
for (i = 1; i <= 100; i++){
sum = sum+i;
cout<<sum<<endl;
}
cout<<sum;
return 0;
}
1 Stem
5 AntwoordenMissing code
0 Stemmen
3 AntwoordenWhat is the output of this code?
0 Stemmen
6 AntwoordenJava
0 Stemmen
4 AntwoordenPopulair vandaag
Decorators in python.
2 Votes
Need help
1 Votes
How to install Bcrypt here
1 Votes
Please click me
0 Votes
What is happening with sololearn
1 Votes
Hello !
0 Votes
Programming language learning
0 Votes
Help
1 Votes