Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- int b;
- int c;
- int d;
- cout << "Input price of the battery\n";
- cin >> a;
- cout << "Input price of the grease\n";
- cin >> b;
- cout << "Input number of batteries\n";
- cin >> c;
- cout << "Input amount of grease\n";
- cin >> d;
- cout << "Total cost\n";
- cout << a*c + b*d << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement