Quyidagi masalaning dasturini tuzing


Download 193.48 Kb.
Sana18.12.2022
Hajmi193.48 Kb.
#1029490
Bog'liq
topshiriq 4.dasturi


Quyidagi masalaning dasturini tuzing:

  1. (Muntazam beshburchak). Foydalanuvchi tomonidan muntazam beshburchakka tashqi chizilgan aylana radiusi kiritilganda, beshburchakning yuzasini hisoblovchi dastur tuzing.


Beshburchak yuzasining formulasi quyidagicha:



Bu yerda S beshburchak tomoni uzunligi bo’lib, quyidagiga teng:






T/r

Kiruvchi ma’lumot

Chiquvchi ma’lumot

1

3

21.3988

2

5

59.441

3

10

237.764



Kode:
#include
#include
using namespace std;
int main()
{
double R,S,pi=M_PI,Yuza;
cout<<"Radiusni kiriting"<std::cin >> R;
S=2*R*sin(pi/5);
Yuza=5*S*S/4*tan(pi/5);
cout<<"S="<cout<<"Yuza="<return 0;
}
R=3



R=5

R=10

Download 193.48 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling