- 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; }
1 Réponse
+ 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;
}