0
Where is error?
#include <iostream> using namespace std; int main(); int a=1; { for (int i=1; i<=3; i++); { for (int j=1; j<=5; j++); { cout<<a++ } printf("\n"); } getch() return 0; }
5 odpowiedzi
+ 2
https://code.sololearn.com/cr9vObVx6tNA/#
you had a few errors...
i guess getch() does not work on sololearn.
+ 1
It should be:
#include <iostream>
using namespace std;
int main(){
int a=1;
for (int i=1; i<=3; i++){
for (int j=1; j<=5; j++){
cout<<a++;
}
printf("\n");
}
getch();
return 0;
}
+ 1
thank you for all answer.Im delete getch().its true.
12345
678910
1112131415
if i wanna start 5. for ex.
678910
1112131415
1617181920
how is i made?
+ 1
To start counting from 6,
just start variable 'a' at 6:
int a = 6;
+ 1
thank you very much.