[ create a new paste ] login | about

Link: http://codepad.org/42c4usL4    [ raw code | output | fork ]

C, pasted on Jan 24:
1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
using namespace std;
main() {
	int n,i,j,k;
	cin>>n;;
	for(i = 1; i <= n; i++) {
		for (k=1;k<=n-i;k++) cout<<"  ";
		for(j = 1; j <= i; j++)  cout<<"* ";
		cout<<"\n";}
   
}


Output:
1
2
3
4
5
6
7
Line 19: error: iostream: No such file or directory
Line 2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namespace'
In function 'main':
Line 5: error: 'cin' undeclared (first use in this function)
Line 5: error: (Each undeclared identifier is reported only once
Line 5: error: for each function it appears in.)
Line 7: error: 'cout' undeclared (first use in this function)


Create a new paste based on this one


Comments: