0

An example of how to compute the area of a rectangle using c++

using global declations

15th Feb 2017, 5:50 PM
chamaliakhan
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; }
16th Feb 2017, 5:21 AM
Megatron
Megatron - avatar
0
double rectangleArea(double width, double height) { return width * height; }
15th Feb 2017, 7:26 PM
Francisco Gonzalez
Francisco Gonzalez - avatar