Qarshi 2023
1-Amaliy mashg’ulot Mavzu: Chiziqli tuzilmali algoritmlarni tavsiflash, C++ tilida dasturlashtirish va kompyuterda hisoblashlar o‘tkazish ishning maqsadi: Algoritmlar, algoritm turlarini, Chiziqli tuzilmali algoritmlarni, Chiziqli tuzilmali algoritmlarni tavsiflashni, dasturlarini
tuzishni va kompyuterda hisoblashlar o‘tkazishni o‘rganish Amaliy ish vazifalari: Berilgan funksiya qiymatlarini hisoblash algoritmining blok–sxemasi tuzilsin
Tuzilgan dastur kompyuterning DEV C++ yoki BORLAND BUILDER C++
tizimiga kiritilib, hisoblashlar o‘tkazilsin va jadval to‘ldirilsin
M ening jurnaldagi o’rnim: 13
#include #include #includeusing namespace std; int main()
{ double x, n, m, S=0; cout<<"x="; cin>>x; cout<<"m="; cin>>m; for(int n=1; n<=m; n++) S=S+pow(n,3)*x*x/(pow((4*n+1),3)); cout<} II topshiriq A Misol:
#include #include #include using namespace std; int main() { float x,y; cout<<"\n"; cout<<" x ni qiymatini kiriting, x="; cin>>x; if (x>0) y=1/(x*x*x*x+3*x+5); else y=x*x*x*x+3*x+5; cout<<"\n"; cout<<" natija y="<}
B misol :
#include using namespace std; int main()
{ float a, b, x, y; cout<<"\n"; cout<<" a ni qiymatini kiriting, so`ng ENTER ni bosing a="; cin>>a; cout<<"\n"; cout<<" b ni qiymatini kiriting, so`ng ENTER ni bosing b="; cin>>b; cout<<"\n"; cout<<" x ni qiymatini kiriting, so`ng ENTER ni bosing x="; cin>>x; if (x=0) y=x*x*x*x+x*x+2*x+7;
else
{ if (x>0) y=pow(x,b)+cos(x+a); else y=sqrt(sin(x*x)+log(fabs(3*x)));} cout<<"\n"; cout<<" natija y="<}
a qiymati a=2
a qiymati a=1
a qiymati a=1
b qiymati b=3
b qiymati b=2
b qiymati b=2
x qiymati x=5
x qiymati x=-5
x qiymati x=-5
natija y=125.754
natija y=1.6049
natija y=0
III topshiriq
m 3x2 n S=∑ 3 4n+1)
#include #include #include using namespace std; int main()
{ double x, n, m, S=0; cout<<"x="; cin>>x; cout<<"m="; cin>>m; for(int n=1; n<=m; n++) S=S+pow(n,3)*x*x/(pow((4*n+1),3)); cout<}
Qiymat m=5
X=0.64
Natija s= S=0.0236698
#include #include #include using namespace std; int main()
{ double x, n, m, S=0; cout<<"x="; cin>>x; cout<<"m="; cin>>m; for(int n=1; n<=m; n++) S=S+pow(n,3)*x*x/(pow((4*n+1),3)); cout<}