fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int x,y,i,k;
  6. cout<< "Podaj wysokosc"<<endl;
  7. cin>>x;
  8. cout<< "podaj szerokosc"<<endl;
  9. cin>>y;
  10. for (int i=1; i<=x; i=i+1)
  11. { for (int k=1; k<=y; k=k+1)
  12. { if (i==1 || i==x || k==1 || k==y){
  13. cout<<"#";
  14. }
  15. else
  16. cout<<" "
  17. }
  18. cout<<"\n"}
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:17:2: error: expected ‘;’ before ‘}’ token
  }
  ^
prog.cpp:18:12: error: expected ‘;’ before ‘}’ token
  cout<<"\n"}
            ^
prog.cpp:5:10: warning: unused variable ‘i’ [-Wunused-variable]
  int x,y,i,k;
          ^
prog.cpp:5:12: warning: unused variable ‘k’ [-Wunused-variable]
  int x,y,i,k;
            ^
stdout
Standard output is empty