# flowchart for array function

Page 1 of 1

## 1 Replies - 33689 Views - Last Post: 10 December 2008 - 02:56 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=75943&amp;s=4395d163476f2e311eca6e50790c097c&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 dieqa_waneqnour

• New D.I.C Head

Reputation: 0
• Posts: 4
• Joined: 09-December 08

# flowchart for array function

Posted 09 December 2008 - 10:41 PM

hi.. can you help me on writing the flowchart for this code?

```#include <iostream.h>
int x (int);
main ()
{
char w = 'y';
int y;
int z[ ] = {6,11,13,25,26};
cout<<" \n\t\t\t***Hye.. Welcome to my program..***";
cout<<" \n\n\t\tThis program sums first n integers from an array.";
cout<<" \n\t\tThe array is {6,11,13,25,26} ";
cout<<" \n\t\tOnly value 0 to 4 can be entered";
while(w=='y' || w=='Y')
{
cout<<" \n\n\t\tPlease enter a number :: ";
cin>>y;
cout<<"\n\t\tThe answer is "<<x(y)<<".";
cout<<"\n\n\n\tContinue? (Y/N) : ";
cin>>w;
}

while (w=='n' || w=='N')
{
cout<<"\n\t\t\t***Thank you.. Have a nice day..!***";
break;
}
}
int x (int y)
{
int z[ ] = {6,11,13,25,26};
if ( y < 0 )
{
return 0;
}
else
{
return z[y] + x(y-1);
}
}

```

Is This A Good Question/Topic? 0

## Replies To: flowchart for array function

### #2 yunusabd

Reputation: 3
• Posts: 104
• Joined: 25-October 08

## Re: flowchart for array function

Posted 10 December 2008 - 02:56 PM

If you need the chart for school or any where else bellow is the standards for flow charting.

1.Define the problem
2.Identify input, output
3.Design algorithm
4.Develop flowchart, pseudo-code, etc.
5.Code the program -- write the program
6.Test the program --run it
7.Debug the program (fix errors if any)
8.Document completed program (final pseudo-code, flowchart, print chart, etc.)

Algorithmic Tools
Flow chart: (American National Standards Institute -- ANSI symbols:)
A pictorial representation of program logic
Parallelogram for input/output
Oval for start and stop
Rectangle for processing
Diamond for decision
Hexagon for preparations and loops
Circle for connector
Arrow for flow direction
Either the oval or large circle can be used as the START or TERMINATE symbol.

Go to link bellow for illustrated examples.
http://en.wikipedia.org/wiki/Flowchart

(edit) I almost forgot you can make the flow chart in Powerpoint or any program like it or even in a paint program, I think that there are all the basic shapes in most word processing applications also.

This post has been edited by yunusabd: 10 December 2008 - 02:58 PM