Basic EDC pric C++

#include <iostream>
using namespace std;
int main(){
    int oldNumber, newNumber, user, pay;
    cout<<"input Old number:"; cin>>oldNumber;
    cout<<"Input New number:"; cin>>newNumber;

   user=newNumber-oldNumber;    if(oldNumber>=newNumber){
    cout<<"Please Input again";
    }else if(user<50)
            pay=user*350;
            else if(user<=100)
            pay=user*400;
            else if(user<=150)
            pay=user*500;
            else if(user<=200)
            pay=user*600;
        else pay=user*700;
   
    cout<<pay; cout<<" R";
   
    return 0;
}


Post a Comment

0 Comments