fork download
  1. using namespace std;
  2.  
  3.  
  4.  
  5. main()
  6.  
  7. {
  8.  
  9.  
  10.  
  11. int i;
  12.  
  13. int n;
  14.  
  15. int valor;
  16.  
  17.  
  18.  
  19.  
  20.  
  21. cout<<"introduzca valor (1-7)"<<endl;
  22.  
  23. cin>>valor;
  24.  
  25. cout<<endl;
  26.  
  27.  
  28.  
  29. for(i=1;i<=valor;i++){
  30.  
  31. for(n=1;i>=n;n++)
  32.  
  33. cout<<"*";
  34.  
  35. cout<<"\n";
  36.  
  37. //printf("\n");
  38.  
  39.  
  40.  
  41. }
  42.  
  43.  
  44.  
  45. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:1: error: unknown type name ‘using’
 using namespace std;
 ^~~~~
prog.c:1:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘std’
 using namespace std;
                 ^~~
prog.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
prog.c: In function ‘main’:
prog.c:21:2: error: ‘cout’ undeclared (first use in this function)
  cout<<"introduzca valor (1-7)"<<endl;
  ^~~~
prog.c:21:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:21:34: error: ‘endl’ undeclared (first use in this function)
  cout<<"introduzca valor (1-7)"<<endl;
                                  ^~~~
prog.c:23:2: error: ‘cin’ undeclared (first use in this function)
  cin>>valor;
  ^~~
stdout
Standard output is empty