fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // deklarasi nis
  6. int nis[5] = {6200,6201,6202,6203,6205};
  7.  
  8. // tampilan nis
  9. for(int i=0; i<5; i++) {
  10. cout<<"Nilai pada array nis elemen ke" <<i<<" adalah :" <<nis[i]<<endl;
  11. )
  12. return 0;
  13. )
Compilation error #stdin compilation error #stdout 0s 4240KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:1: error: expected primary-expression before ‘)’ token
 )
 ^
prog.cpp:13:1: error: expected primary-expression before ‘)’ token
 )
 ^
prog.cpp:13:1: error: expected ‘}’ at end of input
prog.cpp:9:24: note: to match this ‘{’
 for(int i=0; i<5; i++) {
                        ^
prog.cpp:13:1: error: expected ‘}’ at end of input
 )
 ^
prog.cpp:4:12: note: to match this ‘{’
 int main() {
            ^
stdout
Standard output is empty