Computer Science, asked by lakshyakhyani, 8 months ago


Q4)WAP to accept price and quantity of an item and find bill,discount,netbill.
bill=quantity*price
netbill=bill-discount.
bill
discount
>=10000
10%
<10000
2%​

Answers

Answered by mahirjaiswalX
0

Answer:

very easy questions you are asking try difficult question

Answered by imtiyazallam
0

Answer:

#include<iostream>

using namespace std;

int main(){

   int price, quantity, bill, dis2;

   double dis, netBill;

   cout << "Enter price of the article: ";

   cin >> price;

   cout << "Enter the quantity: ";

   cin >> quantity;

   bill = price * quantity;

   if(bill >= 10000){

       dis2 = 10;

       dis = 10.0 / 100 * bill;

   }else {

       dis2 = 2;

       dis = 2.0 / 100 * bill;

   }

   netBill = bill - dis;

   cout << "Bill = " << bill << endl;

   cout << "Net Bill = " << netBill << endl;

   cout << "Discount = " << dis << endl;

   cout << "Discount in % = " << dis2 << "%";

}

Attachments:
Similar questions