Q&A DiscussÔes
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 Voto
5 Respostas#include <iostream>
using namespace std;
class A{
public:
void f1();
};
class B : public A{
public:
virtual void f1();
}
int main()
{
A * obj = new B;
obj.f1();
}
Ques: can we write virtual before an overridden function from the base class?? if yes which f1() should it call base class f1() or derived class f1()???
0 Voto
1 RespostaWher is mistake?
0 Voto
5 RespostasQuente hoje
Python
2 Votes
Are websites hackable?
2 Votes
TICTACTOE
1 Votes
Learn python
2 Votes
Error
0 Votes
BIG DOUBTđ€đ€đ€đ€
2 Votes
Need help (French)
1 Votes
Help for study
0 Votes
Spying on me
1 Votes