/*
Выводы перед вводом данных(cout) можно убрать (сделал для удобства)
*/
#include <iostream>
#include <vector>
#define UNITS '$' // <- Валюта
using namespace std;
int main()
{
int SWEETS, COOKIES, APPLES;
cout<<"Price for 1 kg of sweets\n>>"<<UNITS;
cin>>SWEETS;
cout<<"Price for 1 kg of cookies\n>>"<<UNITS;
cin>>COOKIES;
cout<<"Price for 1 kg of apples\n>>"<<UNITS;
cin>>APPLES;
int x, y, z;
cout<<"Enter amount in kg\n";
cout<<"How many sweets?\n>>";
cin>>x;
cout<<"How many cookies?\n>>";
cin>>y;
cout<<"How many apples?\n>>";
cin>>z;
int total = x*SWEETS + y*COOKIES + z*APPLES;
cout<<"\n"<<"TOTAL PRICE IS\n"<<UNITS<<total<<"\n\n";
return 0;
}
/*
Выводы перед вводом данных(cout) можно убрать (сделал для удобства)
*/
#include <iostream>
#include <vector>
#define UNITS '$' // <- Валюта
using namespace std;
int main()
{
int SWEETS, COOKIES, APPLES;
cout<<"Price for 1 kg of sweets\n>>"<<UNITS;
cin>>SWEETS;
cout<<"Price for 1 kg of cookies\n>>"<<UNITS;
cin>>COOKIES;
cout<<"Price for 1 kg of apples\n>>"<<UNITS;
cin>>APPLES;
int x, y, z;
cout<<"Enter amount in kg\n";
cout<<"How many sweets?\n>>";
cin>>x;
cout<<"How many cookies?\n>>";
cin>>y;
cout<<"How many apples?\n>>";
cin>>z;
int total = x*SWEETS + y*COOKIES + z*APPLES;
cout<<"\n"<<"TOTAL PRICE IS\n"<<UNITS<<total<<"\n\n";
return 0;
}