lundi 13 janvier 2020

new output file with the following requirements

Hello I have this code which creates a file such us this

ofstream outfile ("test2.txt");
outfile << "123 abc abc abc 123 432 \n 123 123 abc abc abc \n 123 \n 123 123 432 " << endl;

outfile.close();

Now I want to put in a new output file only the three digits number which first digit is less than the second one and the third one(the second one at the same time less than the third one) but I am not sure where to start to create this method, this is what I think is the beginning.

bool IsValid(unsigned int num)
{

}

Aucun commentaire:

Enregistrer un commentaire