Nov 19, 2021 at 3:14am
sum+=num;
Try putting this before the loop starts.
Then try putting it inside the loop.
Think about whether it should go before or after the adjustment of num.
Nov 19, 2021 at 4:00am
Ohh it works when it's in the loop how? But another problem is how can I make the 3, 6, and 9 into 3.0, 6.0 and 9.0
Nov 19, 2021 at 4:31am
But setprecision doesn't add .0 to the whole numbers.
Nov 19, 2021 at 5:27am
Keep reading.
iomanip has lots of things for you to try.
Nov 19, 2021 at 5:40am
Ohh sh*t I got it, thanks man!