please help me in creating pascal triangle in cobol having 6



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

please help me in creating pascal triangle in cobol having 6

Postby priya merh » Thu Aug 08, 2013 11:52 am

Please help me in creating a pascal triangle having 6 rows
priya merh
 
Posts: 2
Joined: Thu Aug 08, 2013 11:43 am
Has thanked: 0 time
Been thanked: 0 time

Re: please help me in creating pascal triangle in cobol havi

Postby NicC » Thu Aug 08, 2013 1:37 pm

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: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: please help me in creating pascal triangle in cobol havi

Postby priya merh » Thu Aug 08, 2013 1:51 pm

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

Re: please help me in creating pascal triangle in cobol havi

Postby NicC » Thu Aug 08, 2013 2:08 pm

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: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: please help me in creating pascal triangle in cobol havi

Postby Ed Goodman » Fri Aug 09, 2013 5:51 pm

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: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post