hey people,(adsbygoogle = window.adsbygoogle || []).push({});

Im a beginner when it comes to programming and i have just stated C++..Im finding it a bit hard and boring but its only the beginning, so i think that it would get better as i move on....Anyway i need some help with these questions...

BTW for your info: Im using a book called "A gentle introduction to C++" by Dan Hawhorn...

So here are my questions:

Part A

1)Enter a number from the keyboard

2)Test the number to make sure it is a positive integer

3)If not, loop back and re enter a new number

4)Calculate the display the sum of all integers from 1....

5)e.g. If N = 8, then Sum = 1+2+3+4+5+6+7+8 = 36

Part B

1) Enter a number from the keyboard

2) Test the number to make sure it is a positive integer, less than 18

3) (otherwise the result will be too large)

4) If not, loop back to re enter a new number

5) Calculate and display the product of all integers from 1.....N

6) e.g. If N = 5, then product = 1*2*3*4*5 = 120 = 5! = 5 factorial.

I would be most happy if anyone could help me with writing these programs......

The program i am using is Dev-C++, oh and i am progressing through those tutorials(stickies) on the top...

Thanks a lot

Jake

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# C++ Question help >

**Physics Forums | Science Articles, Homework Help, Discussion**