HELP! How do you make an Algorithmic loop?

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Thread Solved

Join Date: Nov 2008
Posts: 468
Reputation: Grn Xtrm will become famous soon enough Grn Xtrm will become famous soon enough 
Solved Threads: 39
Grn Xtrm's Avatar
Grn Xtrm Grn Xtrm is offline Offline
Posting Pro in Training
 
0
  #11
Oct 8th, 2009
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.
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,658
Reputation: BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold 
Solved Threads: 206
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso
 
0
  #12
Oct 8th, 2009
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.
Out.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 468
Reputation: Grn Xtrm will become famous soon enough Grn Xtrm will become famous soon enough 
Solved Threads: 39
Grn Xtrm's Avatar
Grn Xtrm Grn Xtrm is offline Offline
Posting Pro in Training
 
0
  #13
Oct 8th, 2009
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.
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,658
Reputation: BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold BestJewSinceJC is a splendid one to behold 
Solved Threads: 206
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso
 
0
  #14
Oct 9th, 2009
But how does that help him learn anything. . ?
Out.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 468
Reputation: Grn Xtrm will become famous soon enough Grn Xtrm will become famous soon enough 
Solved Threads: 39
Grn Xtrm's Avatar
Grn Xtrm Grn Xtrm is offline Offline
Posting Pro in Training
 
1
  #15
Oct 9th, 2009
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.
Check out my new band URL on facebook. I'm the bass player. :) Become a fan and leave comments if you like.
URL on facebook!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 11
Reputation: jingle_br is an unknown quantity at this point 
Solved Threads: 1
jingle_br jingle_br is offline Offline
Newbie Poster
 
0
  #16
Oct 13th, 2009
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!
EXE Stealth - Protect exe files against cracking, hacking with serial managment and more.

EXE Bundle - Bundle more exe files in one startable file.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 10
Reputation: Drlionheart is an unknown quantity at this point 
Solved Threads: 1
Drlionheart Drlionheart is offline Offline
Newbie Poster
 
0
  #17
Oct 13th, 2009
can you try this way
for the algorithm loop in 'C' Language.

for ( vaiable = initialization, variable< Max No. To Loop,variable increment) ;
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 688 | Replies: 16
Thread Tools Search this Thread



Tag cloud for Computer Science
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC