Dyskusje Q&A
What the difference between :
-2 głosów
3 odpowiedzihelp
-2 głosów
5 odpowiedzi
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 Głos
5 odpowiedziPopularne dzisiaj
AI Takeover
2 Votes
Using Python on VScode
1 Votes
Python Developer
0 Votes
Average of Two Numbers
0 Votes
Hearts
0 Votes