fork download
  1. int main() {
  2. int n;
  3. cout << "Ile elementow ma tablica?\n n = ";
  4. cin >> n;
  5. int* L = new int[n];
  6. cout << "Podaj elementy:" << endl;
  7. for (int i = 0; i < n; i++)
  8. cin >> L[i];
  9. cout << wyliczKoszt(L, n) << endl;
  10. delete[] L;
  11. system("pause");
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:3:3: error: ‘cout’ was not declared in this scope
   cout << "Ile elementow ma tablica?\n n = ";
   ^~~~
prog.cpp:4:3: error: ‘cin’ was not declared in this scope
   cin >> n;
   ^~~
prog.cpp:6:32: error: ‘endl’ was not declared in this scope
   cout << "Podaj elementy:" << endl;
                                ^~~~
prog.cpp:9:27: error: ‘wyliczKoszt’ was not declared in this scope
   cout << wyliczKoszt(L, n) << endl;
                           ^
prog.cpp:11:17: error: ‘system’ was not declared in this scope
   system("pause");
                 ^
stdout
Standard output is empty