asked 35.7k views
1 vote
5. Write a C++ program that can display the output as shown below. Your

program will calculate the price after discount. User will input the
price and the discount is 20%




5. Write a C++ program that can display the output as shown below. Your program will-example-1

1 Answer

0 votes

Answer:

#include<iostream>

using namespace std;

int main()

{

float price;

float discount;

cout<<"enter price : ";

cin>>price;

discount=price - (price * 20 / 100);

cout<<"discount rate is :"<<discount;

}

Step-by-step explanation:

answered
User CorPao
by
8.5k points

No related questions found