fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main() {
  4. int i = 1;
  5. for (j = 1; j <= 10; j++) {
  6. i *= j;
  7. }
  8. cout << "10펙토리얼 값은" << i << endl;
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:7: error: ‘j’ was not declared in this scope
  for (j = 1; j <= 10; j++) {
       ^
stdout
Standard output is empty