هذا السؤال حاةلت فيه كثير وما توصلت لحله
ممكن تساعدوني
علما اني مبتدئه في c++
Write a program for a grocery that reads products data and determine and display the product that has the highest price and the average price. A product has three pieces of data: id (int), name (String) and price (double).Your program should continue reading new products until user enters -1 as id of a product.
Example:
ID Name price
1001 Pepsi 1.5
1021 Kit Kat 2
1011 Chips 1
-1
-----
The most expensive product is:
Id: 1021
Name: Kit Kat
Price: 2 S.R.
Average price = 1.5
وشكرا
