what is C++ builder code for sum

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2006
Posts: 6
Reputation: kaka_shi is an unknown quantity at this point 
Solved Threads: 0
kaka_shi kaka_shi is offline Offline
Newbie Poster

what is C++ builder code for sum

 
0
  #1
Nov 13th, 2006
hi members...please help me about this code...the sum code is like the attachment below...
Attached Thumbnails
sum and conjugate.bmp  
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: what is C++ builder code for sum

 
0
  #2
Nov 13th, 2006
OK... so you're basically asking us to do your homework. Basically, the function takes 2 parameters, adds them together, and returns the result. Here's some pseudocode:
  1. sum: number1, number2
  2. {
  3. return number1 + number2
  4. }
And basically if you can't figure that out, you seriously need to do some learning on C++.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,397
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: what is C++ builder code for sum

 
0
  #3
Nov 13th, 2006
If I remember my calculas correctly (mind you its been over 35 years), problem 1 is asking you to calculate the sum of all the numbers between 0 and some maximum value, that you will probably enter from the keyboard. If that is true, your program will need an integer that accumulates the sum and it will need a loop that counts from 0 to N-1.

I don't recall what the second problem means.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 6
Reputation: kaka_shi is an unknown quantity at this point 
Solved Threads: 0
kaka_shi kaka_shi is offline Offline
Newbie Poster

Re: what is C++ builder code for sum

 
0
  #4
Nov 13th, 2006
thank you to joeprogrammer and ancient dragon...to ancient dragon..its right just as you wrote...for the sum symbol...actually its not integer that ll be sum but its data array...

for the second symbol is the conjugate...how to change this symbol in C++ builder??
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,397
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: what is C++ builder code for sum

 
0
  #5
Nov 13th, 2006
Originally Posted by kaka_shi View Post
thank you to joeprogrammer and ancient dragon...to ancient dragon..its right just as you wrote...for the sum symbol...actually its not integer that ll be sum but its data array...

In that case, use the loop counter as index into the array
  1. int array[255];
  2. ...
  3. ...
  4. sum += array[i];
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 6
Reputation: kaka_shi is an unknown quantity at this point 
Solved Threads: 0
kaka_shi kaka_shi is offline Offline
Newbie Poster

Re: what is C++ builder code for sum

 
0
  #6
Nov 13th, 2006
ancient dragon

do you know how to coding a FFT formula using C++ builder...
i do a lot of codes but it cant be run
consist alot of error when i compile....
if u can help me...i ll attach the formula..a simple formula but for the begginer like me...its very hard...
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,397
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1466
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: what is C++ builder code for sum

 
0
  #7
Nov 14th, 2006
kaka: I don't have my crystle ball with me :mrgreen: , so you will have to post the code and a few of the error messages. Also tell us what compiler and operating system you are using.

Sorry, I'm not into programming calculas formulas. But maybe some of the other smart members can help you with that.
Last edited by Ancient Dragon; Nov 14th, 2006 at 8:42 am.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC