dimanche 5 mai 2019

How to rewrite the following code without 'switch' and 'if-else' condition? [on hold]

int main()
{
    switch (month) 
    {
    case 1:
        days = 31;
        break;
    case 2:
        days = 28;
        break;
    case 3:
        days = 31;
        break;
    }
}

Aucun commentaire:

Enregistrer un commentaire