Hello, I'm trying to write my first while code that will only spit out numbers when the "total" is positive up to a certain rage. I'm having a problem with my syntax, and was wondering if someone can tell me what im doing wrong?
#include<iostream>
#include <string>
#include<iostream>
#include <string>
#include <cstdlib>
usingnamespace std;
int main()
{
int number;
int count;
int total;
int max;
cout<<"input number"<<endl;
cin>>number;
cout<<"input your maximum number";
cin>>max;
count=0;
while (((count*number)<max-number) && (max>0)){
total=number*count;
cout<< total<<", ";
count=count+1;
}
if (total=max-number)
cout<<total;
}