dimanche 5 mars 2017

Why I cannot write ( i % 13.5) in C++ [duplicate]

This question already has an answer here:

I am writing a loop in C++ to output all the numbers larger than 333 and less than 1000 and can be divided on 13.5 with no reminder.

int i = 333;
while(i < 1000){
if ( i % 13.5 == 0)
cout << i << "   ";
i++
}

But I have many errors like type conversion and i is not a template why ? How to solve this ?

Aucun commentaire:

Enregistrer un commentaire