Написать программу нахождения площади и периметра квадрата.C++

12 Окт 2019 в 01:44
218 +1
0
Ответы
1
include

using namespace std;

int main() {
float side, area, perimeter;

// Input side length of square
cout << "Enter the side length of the square: ";
cin >> side;
// Calculate area and perimeter of square
area = side * side;
perimeter = 4 * side;
// Display the area and perimeter of square
cout << "Area of the square: " << area << endl;
cout << "Perimeter of the square: " << perimeter << endl;
return 0;

}

19 Апр 2024 в 11:59
Не можешь разобраться в этой теме?
Обратись за помощью к экспертам
Гарантированные бесплатные доработки в течение 1 года
Быстрое выполнение от 2 часов
Проверка работы на плагиат
Поможем написать учебную работу
Прямой эфир