Calculate total expenses

Description:

Write a program to calculate the total expenses. Quantity and price per item are input by the user and discount of 10% is offered if the expense is more than 5000. Test Case 1 Input (stdin) 500 5 Expected Output 2500 Test Case 2 Input (stdin) 50 650 Expected Output 29250

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b,c;

  cin>>a>>b;

  c=a*b;

  if(c<5000)

  cout<<c;

  else

    cout<<c-(c/10);

return 0;

}