tuannn

nothing at all
mail@pastecode.io avatar
unknown
c_cpp
2 years ago
436 B
1
Indexable
Never
#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 << "The perimeter and area of the rectangle you want is " << (a+b)/2 << " and " << a*b << ", respectively";
    return 0;
}