#include<iostream> void main() { for(int x=1; x<=4; x++) {for(int i=1; i<=x; i++) cout<<" "; for(a=7; a<=1; a-=2) for(int y=a;y>=1; x--) cout<<"&"; } }
Standard input is empty
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 ^
Standard output is empty