Final answer:
To find the lowest price in C++, create an array to store the prices and iterate through it to identify the lowest price. Additionally, you can calculate the total price using a loop.
Step-by-step explanation:
To find the lowest price of the items, you can use an array to store the prices and then iterate through the array to find the lowest price. Here's a sample program in C++:
#include <iostream>
#include <climates>
using namespace std.
int main () {
int Num Items.
cout << "Enter the number of items: ".
cin >> Num Items.
int prices [Num Items].
cout << "Enter the prices of the items: ";
for (int i = 0; i < Num Items; i++) {
cin >> prices[i];
}
int lowest Price = INT_MAX.
for (int i = 0; i < Num Items; i++) {
if (prices[i] < lowest Price) {
lowest Price = prices[i].
}
}
cout << "The lowest price is: " << lowest Price << Endl.
int total Price = 0.
for (int i = 0; i < Num Items; i++) {
total Price += prices[i].
}
cout << "The total price is: " << total Price << Endl.
return 0.
}