fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int m,n;cin >>m>>n;
  6. for(int i = 0;i < m-n;i++)
  7. {
  8. for(int j = 0;j < m;j++)
  9. {
  10. cout<<"* ";
  11. }
  12. cout<<"\n";
  13. }
  14. for(int i = 0; i < n;i++)
  15. {
  16. for(int j = 0; j < m-n;j++)
  17. {
  18. cout<<"* ";
  19. }
  20. cout<<"\n";
  21. }
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, or enum expected
#include <bits/stdc++.h>
         ^
Main.java:3: error: class, interface, or enum expected
int main()
^
Main.java:5: error: class, interface, or enum expected
    int m,n;cin >>m>>n;
            ^
Main.java:6: error: class, interface, or enum expected
    for(int i = 0;i < m-n;i++)
    ^
Main.java:6: error: class, interface, or enum expected
    for(int i = 0;i < m-n;i++)
                  ^
Main.java:6: error: class, interface, or enum expected
    for(int i = 0;i < m-n;i++)
                          ^
Main.java:8: error: class, interface, or enum expected
        for(int j = 0;j < m;j++)
                      ^
Main.java:8: error: class, interface, or enum expected
        for(int j = 0;j < m;j++)
                            ^
Main.java:11: error: class, interface, or enum expected
        }
        ^
Main.java:13: error: class, interface, or enum expected
    }
    ^
Main.java:14: error: class, interface, or enum expected
    for(int i = 0; i < n;i++)
                   ^
Main.java:14: error: class, interface, or enum expected
    for(int i = 0; i < n;i++)
                         ^
Main.java:16: error: class, interface, or enum expected
        for(int j = 0; j < m-n;j++)
                       ^
Main.java:16: error: class, interface, or enum expected
        for(int j = 0; j < m-n;j++)
                               ^
Main.java:19: error: class, interface, or enum expected
        }
        ^
Main.java:21: error: class, interface, or enum expected
    }
    ^
17 errors
stdout
Standard output is empty