Radiusi r boʻlgam aylanaga tashqi chizilgan muntazam n burchakning yuzi va perimetrini hisoblovchi dastur tuzing.
Javob;
#include
#include
using namespace std;
int main()
{ double R;
int n;
cout << "R= ";
cin >> R;
cout << "n= ";
cin >> n;
double perimeter = 2 * n * R * sin(M_PI / n);
double area = 0.5 * n * R * R * sin((2 * M_PI) / n);
cout << "Perimetr: " << perimeter << endl;
cout << "Yuzi: " << area << endl;
return 0; }
1+x+y/(x^2+4)+(y-x)^1/3 Matematik formulani hisoblovchi dastur tuzing
Javob;
#include
#include
using namespace std;
int main()
{ double x, y;
cout << "x= ";
cin >> x;
cout << "y= ";
cin >> y;
double A = 1 + x + y / (pow(x, 2) + 4) + pow(y - x, 1.0/3.0);
cout << "Natija: " << A << endl;
Ibrohimov Ozodbek 613-23 guruh talabasi
Do'stlaringiz bilan baham: |