// Using data structures with vectors
#include
#include
using namespace std;
struct fruit {
string origin;
double weight;
int price;
};
int main() {
int n;
cout << "How many fruits? ";
cin >> n;
// Define a vector whose elemements have type "fruit"
vector f(n);
for(unsigned int i=0; i> f[i].origin;
cout << "Price of fruit " << i+1 << "? "; cin >> f[i].price;
cout << "Weight of fruit " << i+1 << "? "; cin >> f[i].weight;
cout << endl;
}
for(unsigned int i=0; i