### the problem with the pascal triangle

 ``123456789101112131415161718192021222324252627282930313233`` ``````#include using namespace std; #define x 10 int main() { int i,j; int a[x][x]; for(i=0;i0;j--) { a[i][j]=a[i-1][j-1]+a[i-1][j]; cout<

the output is that
 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556`` ``````n/ -858993459n/ n/ -858993459n/ -858993458n/ n/ -858993459n/ -1717986917n/ -858993457n/ n/ -858993459n/ 1717986920n/ 1717986922n/ -858993456n/ n/ -858993459n/ 858993461n/ -858993454n/ 858993466n/ -858993455n/ n/ -858993459n/ 2n/ 7n/ 12n/ 11n/ -858993454n/ n/ -858993459n/ -858993457n/ 9n/ 19n/ 23n/ -858993443n/ -858993453n/ n/ -858993459n/ -1717986916n/ -858993448n/ 28n/ 42n/ -858993420n/ -1717986896n/ -858993452n/ n/ -858993459n/ 1717986921n/ 1717986932n/ -858993420n/ 70n/ -858993378n/ 1717986980n/ 1717986948n/ -858993451n/ n/ Press any key to continue . . .``````
You have to be more specific. What is wrong with the output and what is the expected output?
1) line end is '\n' not 'n/' and why do you need double line ends? (\n and endl)
2) line 14: `for(i=1;i<x;i++)` should be `for(i=0;i<x;i++)`
thanks, I got it.
Topic archived. No new replies allowed.