954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

what is C++ builder code for sum

hi members...please help me about this code...the sum code is like the attachment below...

Attachments sum_and_conjugate.bmp (262.4KB)
kaka_shi
Newbie Poster
6 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

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:

sum: number1, number2
{
return number1 + number2
}


And basically if you can't figure that out, you seriously need to do some learning on C++.

John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

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.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

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??

kaka_shi
Newbie Poster
6 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 
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

int array[255];
...
...
sum += array[i];
Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

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...

kaka_shi
Newbie Poster
6 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

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.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You