Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

priya merh

Posts: 2
Joined: Thu Aug 08, 2013 11:43 am
Has thanked: 0 time
Been thanked: 0 time

It does help if you post a COBOL requirement in the COBOL forum and not in Forum Rules!

I have no idea what a Pascal Triangle is with, or without, 6 rows. Being a triangle I presume it has 3 sides. I am not going to spend time reading up on it as I have my own job to do so I suggest you post the definition and what your thoughts are on how to go about it.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator

Posts: 2506
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 86 times

A pascal triangle is something like this

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 1010 5 1
priya merh

Posts: 2
Joined: Thu Aug 08, 2013 11:43 am
Has thanked: 0 time
Been thanked: 0 time

Well, this is obviously an educational exercise. The point of the exercise is not to get a program that gives the correct answer, although that would help!, but to get you thinking of the process. No point getting others to give you the process. Study your output; what has to be done to get each figure?;how do you relate that to your current knowledge of cobol?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator

Posts: 2506
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 86 times

The best way to organize if for me would be to read this: http://en.wikipedia.org/wiki/Pascal%27s_triangle, and look at the picture about half way down where it reads "One property of the triangle is revealed if the rows are left-justified"

If you have trouble understanding what to do with it then, let us know.
Ed Goodman

Posts: 342
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times