**Hello, I tried to program a program that does after my work days so that I work two days a day in the morning and a day in the evening, but I want it to not exceed the number 31 because the month has only 31 days but when I put number 6 for example I find it written to me 32 although I used if () .
#include <iostream>
#include <math.h>
using namespace std;
int main (){
int repos ;
cout << "entrer la date de la 2x4 : " ;
cin >> repos ;
for (int repo ; repos <= 31 ; repos = repos + 5 ){
cout << "\n vous travailler le : [" << repos << "] le jour / ["<< repos+1 << "] la nuit"<< endl;
};
cout << "\n Merci d'utiliser mon application" << endl;
cout << "\n---------------> Soheyb Biaso <---------------\n" ;
}
Aucun commentaire:
Enregistrer un commentaire