- 2

Where is error?

#include <iostream> using namespace std; int i,j; for(i=1; i<=4; i=i+1); { for (j=1; j<=5; j=j+1); {printf("%d ", i+j);} printf("\n"); return 0; }

11th Oct 2018, 8:55 AM
Hasan Aydın
Hasan Aydın - avatar
1 Respuesta
+ 11
Remove semicolan after for loop and include all this in the main function #include <iostream> using namespace std; int main(){ int i,j; for(i=1; i<=4; i=i+1) { for (j=1; j<=5; j=j+1) {printf("%d ", i+j);} printf("\n"); } return 0; }
11th Oct 2018, 9:48 AM
GAWEN STEASY
GAWEN STEASY - avatar