fork download
  1. #include <iostream.h>
  2. #include <values.h>
  3. void citire(int &t, int x[20])
  4. {cout<<"Dati numarul elementelor vectorului";
  5. cin>>t;
  6. cout<<"Dati elementele vectorului";
  7. for(int i=1;i<=t;i++)
  8. cin>>x[i];
  9. }
  10. void main()
  11. {int a[20], n, i, t, k, tmax=-MAXINT, kmax=-MAXINT;
  12. citire(n ,a);
  13. for(i=1;i<=n;i++)
  14. if(a[i]<=a[i+1])
  15. k++;
  16. else
  17. {t=a[i-k+1];
  18. if(tmax<t)
  19. tmax=t;
  20. if(kmax<k)
  21. kmax=k;
  22. k=0;
  23. }
  24. for(i=tmax;i<=kmax;i++)
  25. cout<<a[i];
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:22: error: iostream.h: No such file or directory
prog.cpp: In function ‘void citire(int&, int*)’:
prog.cpp:4: error: ‘cout’ was not declared in this scope
prog.cpp:5: error: ‘cin’ was not declared in this scope
prog.cpp: At global scope:
prog.cpp:10: error: ‘::main’ must return ‘int’
prog.cpp: In function ‘int main()’:
prog.cpp:25: error: ‘cout’ was not declared in this scope
stdout
Standard output is empty