Choose Items For Highest Discount
Chandru went for shopping and he was offered N number of items at various discount percentage rates. Out of these N items he wants to choose N-1 items such that the amount he saves is maximum.
The program must print the item which is to be left out.
First line will contain the value of N - number of items N lines containing item name, label price and the discount percentage separated by one or more spaces.
The name of the item which is not to be purchased as it offers least discount.
2 <= N <= 20 The length of the item name string value is from 1 to 100.
The price of the item is from 1 to 999999
Example Input/Output 1:
harddisk 4000 20
monitor 15000 10
laptop 30000 5
harddisk savings = 800, monitor savings = 1500, laptop savings = 1500. Hence harddisk is offering least savings and is to be left out.
using namespace std;
//Code by yogesh
int main(int argc, char** argv)