Предмет: Информатика, автор: tchumachuma

написать программу, которая подсчитывает площадь равностороннего треугольника, периметр которого равен p на c++

Ответы

Автор ответа: asv40707
1

Ответ:

Объяснение:

#include <iostream>

#include <string>

#include <map>

#include <set>

#include <algorithm>

#include <cmath>

#include <vector>

#include <fstream>

#include <iomanip>

typedef long long ll;

typedef long double ld;

#define len(x) ((int)x.size())

#define f first

#define s second

#define all(x) x.begin(), x.end()

using namespace std;

int main()

{

double p;

cin >> p;

cout << fixed << setprecision(10);

cout << (p * p * sqrt(3)) / 36;

}


asv40707: если есть вопросы по коду, пишите
asv40707: сори за табы, они пропали
Похожие вопросы
Предмет: Русский язык, автор: венера36
Предмет: Английский язык, автор: bbc400
Помогите, пожалуйста!!!!!
Use the verbs in brackets to complete the sentences in Present Continuous or Present Simple.

1. My wife normally __________ (work) at home, but she __________ (spend) this month in Italy.
2. Most days, Tom usually__________ (cycle) to work.
3. When________ the lesson __________ (start) today?
4. What’s your brother doing? He __________ (do) the crossword in the newspaper He __________ (do) it every day.
5. I’m afraid I’ll lose this game of chess. I__________ (play) very badly. I usually ______much better (play).
6. What’s she doing? — She __________ (mend) her husband’s socks. She always__________ them. (mend)
7. Yes, you can borrow my dictionary. I __________ (use) it a lot, but I __________ (not / use) it now.
8. We __________ (not travel) by train very often.
9. She ______________ (be) particularly generous this week.
10. It _____________ (snow) right now. It’s beautiful! I ____________ (like) this weather.
11. The river___________ (flow) very fast today — faster than usual.
12. You ___________ (always to complain) that waiters are rude!
13. I ___________ (walk) to school every day. I ___________ (take, not) the bus.
14. You ___________ (always to borrow) money!
15. That’s worrying because the number of people without job___________ (increase).
16. Robert is a vegetarian. He ___________ (eat, not) meat.
17. ___________ (you, cook) your own dinner every day?
18. Holidays abroad ___________ (become) increasingly popular.
19. Are you in a hurry? — No, I ___________ (walk) quickly because I’m cold.
20. Where’s your father? — He ___________ (be) in the bathroom.
21. He ___________ ( shave ).
22. The neighbours forever___________ (slam) doors and___________ (shout) during the night.
23. My sister ___________ (to take) part in the competitions almost every weekend.
Предмет: Русский язык, автор: Marysia23456