Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- float fency_price(float l, float c)
- {
- float perimeter = 4.0*l;
- float result = perimeter*c;
- return result;
- }
- int main()
- {
- float side_length, fence_cost, total_price;
- cout << "input fency's side length and fence cost";
- cin >> side_length >> fence_cost;
- total_price = fency_price(side_length, fence_cost);
- cout << "sad old man will pay for that " << total_price;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement