The cost of an item is Rs40 What will be the cost of 28 such items . Write a simple program
Answers
Answered by
1
Answer:
#include<iostream>
using namespace std;
int main()
{
int totalexp, qty, price, discount;
cout<<"Enter quantity:";
cin>>qty;
cout<<"Enter price:";
cin>>price;
totalexp=qty*price;
if(totalexp>5000)
{ discount=(totalexp*0.1);
totalexp=totalexp-discount; }
cout<<"Total Expense is Rs. "<<totalexp; return 0; }
Similar questions
Political Science,
1 month ago
Biology,
1 month ago
English,
1 month ago
Math,
2 months ago
Math,
2 months ago
English,
9 months ago
Math,
9 months ago
Computer Science,
9 months ago