fork download
  1. #include<iostream>
  2. void main()
  3. {
  4. for(int x=1; x<=4; x++)
  5. {for(int i=1; i<=x; i++)
  6. cout<<" ";
  7. for(a=7; a<=1; a-=2)
  8. for(int y=a;y>=1; x--)
  9. cout<<"&";
  10. }
  11. }
Compilation error #stdin compilation error #stdout 0s 3344KB
stdin
Standard input is empty
compilation info
prog.cpp:2:11: error: ‘::main’ must return ‘int’
 void main()
           ^
prog.cpp: In function ‘int main()’:
prog.cpp:6:1: error: ‘cout’ was not declared in this scope
 cout<<" ";
 ^
prog.cpp:6:1: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/iostream:61:18: note:   ‘std::cout’
   extern ostream cout;  /// Linked to standard output
                  ^
prog.cpp:7:5: error: ‘a’ was not declared in this scope
 for(a=7; a<=1; a-=2)
     ^
prog.cpp:9:1: error: ‘cout’ was not declared in this scope
 cout<<"&";
 ^
prog.cpp:9:1: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/4.8/iostream:61:18: note:   ‘std::cout’
   extern ostream cout;  /// Linked to standard output
                  ^
stdout
Standard output is empty