lundi 2 août 2021

C++ , find program to offer discount

//help me out with this one please

   #include<iostream>

using namespace std;

int main()
{
   
float a;

float b;

cin>>a;

{
if
(a<100)

    cout<<"no discount"; 
else if
(
    a>=100 && a<500)

        b = a*(10/100);

        cout<<b;

    
 else if(

    a>=500);

    b = a* (20/100);

    cout<<b;


}

}

Aucun commentaire:

Enregistrer un commentaire