• Corsi
  • Compilatore di codice
  • Discuti
  • Prezzi
  • Squadre
Menu

Discussioni Q&A

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; }
c++
1 Voto
5 Risposte
18th Jul 2016, 12:59 PM
Peter Müller
Peter Müller - avatar
#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()???
c++
0 Voti
1 Risposta
24th Sep 2016, 10:52 AM
Amit
Amit - avatar
Wher is mistake?
}#include<<<<"enter<iostream>>>0;aa;a"bb"<<endl;cc"<<endl;cincin>>b;coutcout<<"entercout<<d;d;d=sqrt(a*a+b*b+c*c);endl;intmain(){namespacereturnstd;using
0 Voti
5 Risposte
11th Oct 2018, 2:30 PM
Dima Moshko
Dima Moshko - avatar
WY I get a rundum number from memory when I run this code #include <iostream> using namespace std; int main () { int array [5]; for (int x = 0; x < 5; x++) { array [x] = 42; cout << x << ': ' << array [x] << endl; } return 0; } if I replace ': ' with ": " every thing works well.
arraysc++
0 Voti
2 Risposte
11th Jul 2016, 11:19 PM
zak
< Precedente1...89Successivo >
Popolare oggi
Is it possible to convert .zip file to apk? If yes, how??
1 Votes
Pointers cpp
2 Votes
I think the heart system is ridiculous, 5 hearts that refill after like 5 hours? That is really just crazy to me.
1 Votes
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
0 Votes
Why can’t I use double “ in python?
0 Votes
Is pro worth the money ?
1 Votes
2 cases not correct what's the problem
1 Votes
Coding for Cybersecurity
0 Votes
Drawing images in java
2 Votes
You’re free to give me your advice! 🚨
0 Votes