cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
loops and answers
loops and answers
Mar 8, 2018 at 2:43am UTC
briankiprono
(7)
Im having trouble setting up a loop where an answer got is used again next in the loop.Can anyone write any simple code of your choice for me Thanks.or maybe 1*2 the answer multiplied by 3 then answer by 4,ans *5,ans *6...
Last edited on
Mar 8, 2018 at 3:27am UTC
Mar 8, 2018 at 9:20am UTC
Repeater
(3046)
1
2
3
4
5
6
7
int
answer = 1;
for
(
int
i = 1; i < 11; i++) { answer = answer * i; }
Topic archived. No new replies allowed.