tuan
unknown
c_cpp
4 years ago
454 B
9
Indexable
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <cmath>
using namespace std;
// Perimeter and area of a rectangle
int main(){
float a, b;
cout << "Value of the rectangle's length: ";
cin >> a;
cout << endl;
cout << "Value of the rectangle's width: ";
cin >> b;
cout << endl;
cout << "The perimeter and area of the rectangle you want is " << (a+b)/2 << " and " << a*b << ", respectively";
return 0;
}Editor is loading...