+ 1

problem with 'for loop' C++

Hello there! I paste here link for my code (in C++) https://pastebin.com/5WR7eJXW All I'm trying to do is to input 10 numbers (in my code actually 2 times for easy tests), and multiply them, and then add them together like this: 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317 this is the problem from Project Euler site https://projecteuler.net/problem=48 I can't find a good way to set second 'for loop' to start multiply like I showed above (You have comments right there guys) I hope you can help me :) Thanks in advance!

16th Feb 2018, 8:35 PM
Adam
Adam - avatar
1 Answer
+ 2
something like this ? http://cpp.sh/3qb3w4
16th Feb 2018, 10:05 PM
magicalKhachapuri
magicalKhachapuri - avatar