Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcjęDyskusje Q&A
Element display value
0 głosów
2 odpowiedziupdated course
3 głosów
1 Odpowiedź
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 odpowiedziNeed help about AI !
1 Głos
2 odpowiedziHow to ..?
0 głosów
1 Odpowiedźif i download the programs for c++ on my pc ( codebuilds and the compiler ) and i want to write a program in my package ( workspace ) i create a new file and write smthing beginning
#include <iostream>
using namespace std;
int main ()
{
...
}
and i want to run it, it always runs this first program : Hello World. and not my written program how can i run just my written program ?
have i maybe to write anything else as
int main () {} ?
0 głosów
16 odpowiedziPopularne dzisiaj
Calculator
1 Votes
Solution
0 Votes
C? C++? C#? Horses for courses?
0 Votes
help pls
1 Votes
How to make animation
0 Votes
heart issues
1 Votes
Sololearn logo
0 Votes