This question already has an answer here:
- Can't use modulus on doubles? 2 answers
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