/
rgd045
/
cpp-oop-basics
Обзор
Документация
Войти
/
rgd045
/
cpp-oop-basics
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
projects/expr_example/main.cpp
15 строк
508 B
OMP Education
Add modules
28 июн 2024, 01:09
28 июн 2024, 01:09
0ef3df8
Код
Авторство
О чём код?
// SPDX-FileCopyrightText: 2023 Open Mobile Platform LLC <edu@omp.ru> // SPDX-License-Identifier: BSD-3-Clause #include <iostream> #include <cmath> int main() { float a; // выражение объявление вещественной переменной 'a' a = 5.; // выражение присваивания значения переменной 'a' float h = a * std::sqrt(3) / 2; float s = 0.5 * a * h; std::cout << "Area = " << s << std::endl; return 0; }