0% found this document useful (0 votes)
12 views

DASTU

Uploaded by

bazaclash55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

DASTU

Uploaded by

bazaclash55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1-topshiriq. Yigindini hisoblovchi dastur tuzing.

(30-misol egasi 1-misolni


ishlaydi)
Namuna .
30- masala.
// Online C++ compiler to run C++ program online
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int k;
double A,B;
cout<<"k="; cin>>k;
for(int j=1; j<=k; j++){
if(j!=3){
for(int i=j; i<=k+1; i++){
if(i!=1){
B=B+cbrt(i+5)/(i-1);
}
}
A=A+((j-4)*j/(j-3))*B;
}
}
cout<<"A="<<A<<endl;
return main();
}

Dastur natijasi:
k=1
A=1.91293
k=3
A=32.4566
k=2
A=26.2164
2-topshiriq. Yigindini hisoblovchi dastur tuzing. .(30-misol egasi 1-
misolni ishlaydi)
Namuna .
30-masala
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n;
double x,s,y=0;s=0;
cout<<"n="; cin>>n;
cout<<"x="; cin>>x;
for(int i=1; i<=n; i+=2)
{ s=i*pow(x,i);
y+=sin(s);

}
cout<<y<<endl;

main();
return 0;
}
Dastur natijasi:
n=3
x=2
0.00371906
n=4
x=5
-1.87188
n=6
x=4
-1.82632
n=8
x=5
-3.60293

3-topshiriq. Ichma ich joylashgan takrorlash operatorlaridan


foydalanib rasmda ko’rsatilganlarni chop qiluvchi dastur tuzing
1 1 2 3 4 16 1 2 3 4
5 6 7 8 8 7 6 5
9 10 11 12 9 10 11 12
13 14 15 16 16 15 14 13
2 2 4 6 8 17 1 2 3 4
10 11 12 14 5 6 7
16 18 20 22 8 9
24 26 28 30 10
3 3 5 7 9 18 10
11 13 15 17 9 8
19 21 23 25 7 6 5
27 29 31 33 4 3 2 1
4 1 5 9 13 19 *
17 21 25 29 * * *
33 37 41 45 * * * * *
49 53 57 61 * * * * * * *
5 1 3 5 7 20 *
2 4 6 8 * *
9 11 13 15 * * *
10 12 14 16 * * * *
6 3 5 7 9 21 *
0 0 0 0 * *
11 13 15 17 * * *
0 0 0 0 * * * *
7 0 2 0 4 22 A B C
0 6 0 8 ABC
0 10 0 12 ABC
0 14 0 16
8 0 0 0 0 23 A A A
0 6 7 0 BBB
0 10 11 0 CCC
0 0 0 0
9 0 2 3 4 24 1
5 0 7 8 22
9 10 0 12 333
13 14 15 0 4444
10 1 2 3 0 25 1
5 6 0 8 2 6
9 0 11 12 3 7 10
0 14 15 16 4 8 11 13
5 9 12 14 15
11 26 1
1 2 1 2
2 3 3 2 1 2 3
4 5 6 43 2 1 2 34
7 8 9 10
12 2 27 1 2 3 4 5
4 6 1234
8 10 12 123
14 16 18 20 12
1
13 1 28 5 5 5 5 5
2 3 4444
4 5 6 333
7 8 9 10 22
1
14 1 2 3 4 29 * * * *
5 6 7 * * *
8 9 * *
10 *
15 1 2 3 4 30 * * * *
5 6 7 * * *
8 9 * *
10 *

Namuna .
Ichma ich joylashgan takrorlash operatorlaridan foydalanib rasmda
ko’rsatilganlarni chop qiluvchi dastur tuzing

Ichma ich joylashgan takrorlash operatorlaridan foydalanib rasmda


ko’rsatilganlarni chop qiluvchi dastur tuzing

You might also like