how write program in cpp to enter the sale value and print the agent’s commission

Join Our Official AiJobsAdda Telegram Channel

Hello friends, Welcome to your Techgsr.co blog. And today in this article we will how write program in cpp to enter the sale value and print the agent’s commission .So let’s go to our to.

#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
long int svalue;
float commission;
cout << “Enter the total sale value : ” << endl;
cin>>svalue;
if(svalue<=10000)
{
commission=svalue*5/100;
cout << “For a total sale value of $” << svalue << “, “;
cout << “the agent’s commission is $” << commission;
}
else if(svalue<=25000)
{
commission=svalue*10/100;
cout << “For a total sale value of $” << svalue << “, “;
cout << “the agent’s commission is $” << commission;
}
else if(svalue>25000)
{
commission=svalue*20/100;
cout << “For a total sale value of $” << svalue << “, “;cout << “the agent’s commission is $” << commission;
}
getch();
}

 

This program takes in the total sale value as a screen input from the user.
The program then calculates the agent’s commission with the help of the ‘IF-ELSE’
command as follows :
5% if the total sale value is less than or equal to $10000.
10% if the total sale value is less than or equal to $25000.
20% if the total sale value is greater than $25000. It then outputs the agent’s commission
using the ‘cout’ command.
INPUT :
26000
OUTPUT :
For a total sale value of $26000, the agent’s commission is $5200

Related Post:-

Predict the output of following C++ program in cpp

Print 1 to 100 in C++, without loop and recursion

Factorial Using Loop Example Program In C++

bfs algorithm in data structure (BFS)

if..else Statement Example Program In C++

For Loop Example Program In C++

Program to find the sum of each row & column of a matrix of size n x m andif matrix is square, find the sum of the diagonals also.

 tudo app using html and css javascript

how to create age calculator in html project

how to make toast in html css and javascript

how to make copy to clipboard in javascript

how to create email validation in javascript

So I hope that you learn about the  this And if you have any more queries about computer relegated then feel free to discuss your problem in the comment section.Thank you so much and come back for more updates about Techgsr.co .