944,066 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Oct 8th, 2009
0
Re: HELP! How do you make an Algorithmic loop?
PDL is program design language. It involves no actual coding just writing words that describe what you want a program to do. This is pretty much what you did in your first post. Theb you take the words and turn it into computer code. I take it this is where you are stuck.
Reputation Points: 100
Solved Threads: 48
Posting Pro in Training
Grn Xtrm is offline Offline
495 posts
since Nov 2008
Oct 8th, 2009
0
Re: HELP! How do you make an Algorithmic loop?
You're going to have to choose a language and begin learning the basics of that language. Regardless of what language you choose, you will have to learn about loops such as for loops, while loops, do while loops, etc. And of course, if statements, if else statements, etc. Once you learn these constructs you won't have so much trouble with this problem.
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
Oct 8th, 2009
0
Re: HELP! How do you make an Algorithmic loop?
A c++ program to solve your problem can be done very simply.
First declare an array of size 10
int a[10];
then use a for loop to obtain a number for each of the 10 positions of the array.
    for(int i = 1; i<=10; i++)
    {
            cout<<"enter number "<< i<<endl;
            cin>>a[i];
    }
Finally add all of the elements in the array by using the plus operator.
     int sum=a[1]+a[2]+a[3]+a[4]+a[5]+a[6]+a[7]+a[8]+a[9]+a[10];
     cout<<"sum = "<<sum;
This is an easy way to solve your problem.
Reputation Points: 100
Solved Threads: 48
Posting Pro in Training
Grn Xtrm is offline Offline
495 posts
since Nov 2008
Oct 9th, 2009
0
Re: HELP! How do you make an Algorithmic loop?
But how does that help him learn anything. . ?
Reputation Points: 874
Solved Threads: 352
Posting Maven
BestJewSinceJC is offline Offline
2,758 posts
since Sep 2008
Oct 9th, 2009
1
Re: HELP! How do you make an Algorithmic loop?
I just gave some parts to help the OP get started. He needs to figure out how to use if statements to check illegal inputs and how to find the smallest number in the array. At the very least I introduced topics such as arrays that the OP can do further research to learn more about. Sorry if the post was bad.
Reputation Points: 100
Solved Threads: 48
Posting Pro in Training
Grn Xtrm is offline Offline
495 posts
since Nov 2008
Oct 13th, 2009
0
Re: HELP! How do you make an Algorithmic loop?
Grn Xtrm gave a very good start here and I think it is your time to do your part. I suggest you research and read more on your preferred programming language to use.

Good luck!
Reputation Points: 11
Solved Threads: 1
Newbie Poster
jingle_br is offline Offline
11 posts
since Oct 2009
Oct 13th, 2009
0
Re: HELP! How do you make an Algorithmic loop?
can you try this way
for the algorithm loop in 'C' Language.

for ( vaiable = initialization, variable< Max No. To Loop,variable increment) ;
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Drlionheart is offline Offline
10 posts
since Oct 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: how does computer engineering differ from software engineering?
Next Thread in Computer Science Forum Timeline: Dot Net or J2EE





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC