So you want someone to do your assignment for you without even attempting it yourself?
2007-01-07 21:21:51
·
answer #1
·
answered by rodandalisonthompson 4
·
0⤊
0⤋
The basic code would be something along the lines of this:
int N;
int number;
int product = 1;
cin >> N; // input N
for(number=1;number<=N; number++) // recurs number up to N
{
product = product * number;
// multiplied current number with previously held value
}
cout<< ctr << endl; // returns answer to to dos display
It's not pretty but it just about does the job. The cin allows you to run the program for a variety of numbers without re-editting the code
2007-01-07 21:36:43
·
answer #2
·
answered by Tom :: Athier than Thou 6
·
0⤊
0⤋
The sum of the product? Huh?
If you want the product of the natural numbers, it would go something like:
int i, S;
void main()
{
S = 1;
for (i = 1; i <= 100; i++)
{
S = i * S
}
cout << "The product of the first N natural numbers is " << S;
}
2007-01-07 21:31:35
·
answer #3
·
answered by Puggy 7
·
1⤊
0⤋
More gebobcode:
Read From Keyboard -> J
M = 1
For K = 1 -> J
...L = K * M
...M = K
...N = N + L
Continue
SexyVoice69 "The sum of the products of the first " & K & " numbers is equal to " & N
End Program
2007-01-07 21:36:04
·
answer #4
·
answered by gebobs 6
·
0⤊
0⤋
Dont forget to add
#include
To the top of Puggy's answer
2007-01-07 21:36:35
·
answer #5
·
answered by Anonymous
·
0⤊
0⤋
#comprise #comprise void substantial() { clrscr(); int a,b; cout<<" enter 2 integer numbers!! "; cout<<"n first enter the bigger variety: "; cin>>a; cout<<"n now enter the smaller variety: "; cin>>b; cout<<"nn t effect of THE OPERATION!!"; cout<<"nn sum is: "<<(a+b); cout<<"n distinction is: "<<(a-b); cout<<"n product is: "<<(a*b); cout<<"n quotient is: "<<(a/b); cout<<"n press any key to end "; getch(); } this device is examined with Borland C++ v5.02 and it works large without blunders. that is an easy software without over-burden of the expressions, so as that u can comprehend it easily. word: if u think of that u did not get the respond what u had expected, then extra effective make greater ur question. if u can't respond to different's solutions interior the main suitable way, then extra effective dont ask the question lower back.
2016-12-15 18:36:51
·
answer #6
·
answered by shery 4
·
0⤊
0⤋