• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu

Sesiones de PyR

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 Respuestas
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 Votos
1 Respuesta
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 Votos
5 Respuestas
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 Votos
2 Respuestas
11th Jul 2016, 11:19 PM
zak
< Anterior1...45Siguiente >
En tendencia hoy
Can I import any module in python in this app?
1 Votes
Loops and conditions
2 Votes
GitHub account connecting issue
3 Votes
Algorithm to create maze-like grid
2 Votes
photo upload issue in html code
0 Votes
Coding issue
2 Votes
app for lessons
1 Votes
Alguém Português por aqui?
0 Votes
Any coding competitions?
1 Votes
I can't figure out how to use the getElementById code in JavaScript Code Playground, I've tried multiple times and watched YT
0 Votes