Just printing 1-100 but at every multiple of 10 i want to input message "Multiple of 10" next to the number. So far i can only get it to say it next to all the numbers. Does anyone know what i am missing?
#include <iostream>
using namespace std;
int main()
{
int x = 1;
for(x = 1; x <= 100; x++) {
cout << x;
if(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
cout << "Multiple of 10" << endl;
}
thanks very much. that worked very well. i wish i could have found that in my C++ book. if i may? the program writes the message under the multiple, i tried numerous times to shift it to appear next to the number instead of under but no luck.