0
An example of how to compute the area of a rectangle using c++
using global declations
2 Antworten
+ 2
#include<iostream>
float area,width,length;
void area()
{ area=width*length; }
int main()
{
cin>>width>>length;
area();
std::cout<<area;
return 0;
}
0
double rectangleArea(double width, double height) {
return width * height;
}