Courses
LoginStart now
Courses
LoginStart now

Q&A Discussions

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 Vote
5 Answers
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 Votes
1 Answer
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 Votes
5 Answers
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 Votes
2 Answers
11th Jul 2016, 11:19 PM
zak
< Previous1...89Next >
Hot today
Fast coding (mobile)
2 Votes
Hofstadter a sequence code coach is not running
0 Votes
DSA doubt
1 Votes
Coding help
2 Votes
the code for bigneer is not really what to do after coding begeneer in sololearn
0 Votes
Input errors (python)
1 Votes
Data structure using C
0 Votes
Vote Code
1 Votes
Without degree job
0 Votes
I wanna know is that what about dot net developers in future there is possible they gonna downfall in industry
0 Votes