Code:/ Functions calculate the area and the perimeter of a lot given // the length and the width; #include<iostream> #include<iomanip> using namespace std; // Prototypes Here double funcarea(double length, double width) { return length * width } double funcperim(double length, double width) { return * length * 4 } int main() { double length; double width; double area; double perimeter; cout << "Enter length of lot"; cin >> length; cout << "Enter width of lot"; cin >> width; // do calculations cout << "The area of the lot is: " << area << endl; cout << "The perimeter of the lot is: " << perimeter << endl; return 0; }
Am I using the prototypes in this code correctly?



LinkBack URL
About LinkBacks



