|
#include using namespace std; int main{ float s = 0; for int R=1; R
|
tarix | 18.04.2023 | ölçüsü | 0,84 Mb. | | #100217 |
| 16.02.2023
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI
UNIVERSITETI
2-amaliy ish
DASTURLASH 1
Bajardi: 001. gurux talabasi Abdumavlonov.B
Tekshirdi:Gulyamova Dilfuza Raxmatullaevna
- variant
a)
#include
#include
using namespace std;
int main(){
float sum,n;
cout << "n="; cin>>n;
sum = 0;
for(n = 1; n <= 10; n++){
sum += 1/n;
cout << "sum: " << sum << endl; }
main();
return 0; }
b)
#include
#include
using namespace std;
int main(){
float S = 0;
for(int R=1; R <= 15; R++){
S += pow(R, 3) / (pow(R, 4) + 3*pow(R, 2) + exp(-R)); }
cout << S << endl;
main();
return 0; }
c)
#include
#include
using namespace std;
int main(){
float P1 = 1;
for(int R = 1; R<=15; R++){
float P2 = 1;
for(int i = 1; i <= 10; i++){
P2 *= (pow(R, i) + 1) / (pow(R, 4) + pow(3, i) * R + exp(-R)); }
P1 *= P2; }
cout << P1 << endl;
main();
return 0; }
Dostları ilə paylaş: |
|
|