Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #include <iomanip>
- using namespace std;
- int main() {
- double kg_veg;
- double kg_fruits;
- double total_veg;
- double total_fruits;
- cin >> kg_veg >> kg_fruits >> total_veg >> total_fruits;
- double value_veg = kg_veg * total_veg;
- double value_fr = kg_fruits * total_fruits;
- double total_sum = value_veg + value_fr;
- cout << fixed << setprecision(2) << total_sum / 1.94 << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement