I can t get the sum to print out I did not get any warnings or such.
Trying to do this question here:http://projecteuler.net/problem=1 the program runs and then just stalls forever.
// Adding multiples of this and following equations
#include "std_lib_cmpt125.h"
void SumMultiple(int Max,int Base)
{
int i=0;
int sum=0;
for(i;i<Max;i+Base)
{
sum=i+sum;
};
cout<<"The sum"<<sum;
}
int main()
{
int base=0;
int max=0;
int sum=0;
cout<<"Please enter the sum s multiple: (ex. 3: 3,6,9,12...)
";
cin>>base;
cout<<"Please enter the sum s maximum: (ex. 10000)
";
cin>>max;
SumMultiple(max,base);
return 0;
}
}