lundi 11 novembre 2019

How could I declare all numbers in one if statement I've try declaring all numbers by else if one by one but it seems the code has logical error

include

using namespace std;

int main ()

{

int quantity;

again:

cout<<"Enter the quantity: ";

cin>>quantity;

If(quantitiy == '1' )

{

total = quantity*price

}

else

{

goto again;

}

return 0;

}

// How could i declare all the numbers in one if statement

Aucun commentaire:

Enregistrer un commentaire