#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() {float A[5]; for(int i=8 ; i<16 ; i++) {A[i]=8+rand()%15 ; } {for(i=0; i<6; i++)} {cout<<A[i]*A[i]<<" "; } return 0; }
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:10:6: error: ‘i’ was not declared in this scope {for(i=0; i<6; i++)} ^ prog.cpp:10:20: error: expected primary-expression before ‘}’ token {for(i=0; i<6; i++)} ^ prog.cpp:11:10: error: ‘i’ was not declared in this scope {cout<<A[i]*A[i]<<" "; ^
Standard output is empty