Home of the Ultimate Xbox 360 Modding Tool, Horizon. XboxMB.com is a community of Xbox 360 gamers and modders who share Tutorials, News, Reviews, and other resources. Xbox Message Boards is free to sign up and use, so what are you waiting for? Register Now!
I'm trying to answer this question:: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
My Code:
int i , a , five = 0 , odd = 0;
for(a = 5; a <= 1000; a++){
five = five + a;
for(i = 3; i <= 1000; i++)
odd = odd + i;
cout << "Sum for five is: " << a << endl;
cout<< "Sum for three is: " << odd << endl;
What am I doing wrong here? I've been at it for 30 minutes, Im getting heated. I get the same answer no matter how many ways I do it and its wrong.
Is this laptop good for programming , small gaming ? If not can you find me one thats better? I'd say laptop because since I'm joining the military, I ain't going to be carrying a desktop from base to base especially since I'll be living in the barracks. A laptop is more portable. DELL XPS 15 L521X i7-3612QM 16GB 3.1GHz 1TB & 128GB SSD BLURAY 2GB GT640M 1080p