+ 1
Please let me know where are the mistakes made I'll rectify them
#include<iostream> using namespace std; int perimeter_rectangle (int, double, double); // Prototype int main () { int length,breadth,answer, side = 2; cout<<"Enter the Length"; cin >> length; cout<<"\nEnter the Breadth"; cin >> breadth; answer = perimeter_rectangle ( side,length, breadth); // call cout<<"\nThe perimeter of the rectangle with length" << length <<"and" << "breadth" << breadth << "is" << answer; return 0; } int perimeter_rectangle (int x, int y, int z) { return (x* (y+z)); }
3 odpowiedzi
+ 1
Dipanjan Basu Error in prototype.
Edit:You have used double in the prototype but you are using only integer in the function.
+ 1
It should be all int, since you have have declared all variables as int.
See the first line inside main().
0
So the prototype should be
int perimeter_rectangle ( double, double, double) ;
the rest code is fine?