Ergashov Javlonbek


Download 65.53 Kb.
bet1/4
Sana20.11.2020
Hajmi65.53 Kb.
#148633
  1   2   3   4
Bog'liq
laborotoriya ishi 1


Bajardi

Ergashov Javlonbek

Qabul qildi




Guruh

613-18

Ball/Imzo




Laborotoriya ishi 1

Mavzu: Foydalanuvchi kutubxonalari bilan ishlash.

Ishdan maqsad: Dasturlash tili bilan tanishish, dasturlash tili imkoniyatlarini ko’rib chiqish, dasturiy muhitni o’rnatish , C++ tilini imkoniyatlari bilish, C++ tili bo’yicha dastlabki ma’lumotlarni bilish.

Topshiriq: www.algo.ubtuit.uz saytidagi 1-30 misollarni ishlash.

O`lchami x bo`lgan kubik berilgan uni hajmini toping.


  1. Radiuslari r1, r2, r3 bo’lgan 3 to doira radiuslari berilgan. Doiralarni yuzlarini hisoblang.

#include

#include

#include

using namespace std;

int main()

{float r1,r2,r3; cin>>r1>>r2>>r3;

float S1=M_PI*r1*r1, S2=M_PI*r2*r2, S3=M_PI*r3*r3;

cout<

return 0;}


  1. Yuzasi s va balandligi h bo`lgan uch burchak berilgan. Uni asosini toping.

#include

#include

using namespace std;

int main()

{float s,h;cin>>s>>h;

float a=2*s/h;

cout <return 0;}


  1. Radiusi r bo`lgan sharning yuzini toping.

#include

#include

#include

using namespace std;

int main()

{float r; cin>>r;

float S=4*M_PI*r*r;

cout<

return 0;}


  1. a,b va c tamonli uch burchak berilgan. Uchburchakning yarim perimetri topilsin.

#include

#include

using namespace std;

int main()

{float a,b,c; cin>>a>>b>>c;

float p=(a+b+c)/2;

cout<

return 0;}


  1. Asoslari a va b, balandligi h bo`lgan g`ola yuzini toping.

#include

#include

#include

using namespace std;

int main()

{float a,b,h; cin>>a>>b>>h;

float S=M_PI*a*a/4+M_PI*b*b/4+M_PI*sqrt(pow((a/2-b/2),2)+h*h)*(a/2+b/2);

cout <


  • Konusni balandligi h va radiusi r bo`lsa uni hajmi nimaga teng bo`ladi.

    #include

    #include

    using namespace std;

    int main()

    {float h,r; cin>>h>>r;

    float V=1/3.*M_PI*r*r*h;

    cout<

    return 0;}



    1. Tezligi v bo`lgan avtomabil s masofani qancha vaqtda bosib o`tadi.

    #include

    #include

    using namespace std;

    int main()

    {float v,S; cin>>S>>v;

    float t=S/v;

    cout<

    return 0;}



    1. h balandlikqan erkin tushayotgan jism qancha vaqtdan keyin yerga uriladi(g=9.8)

    #include

    #include

    #include

    using namespace std;

    int main()

    {float h;float const gi=9.81; cin>>h;

    float t=sqrt(2*h/gi);

    cout << setprecision(2)<

    return 0;}


    1. Jo`mrakdan 1 s da 1 milli litr suv tomsa x yilda necha litr suv tomadi.

    #include

    #include

    using namespace std;

    int main()

    {float x; cin>>x;

    float N=60*60*24*365*x/1000;

    cout <

    return 0;}



    1. 1 dan n gacha sonlar berilgan. Berilgan sonlarni yig`indisini toping.

    #include

    #include

    using namespace std;

    int main()

    {float n; cin>>n;

    float S=n*(n+1)/2;

    cout<

    return 0;}



    1. Massasi m bo`lgan jismni og`irligini toping(g=9.8).

    #include

    #include

    using namespace std;

    int main()

    {float m; float const gi=9.81; cin>>m;

    float F=m*gi;

    cout<

    return 0;}



    1. m massali jismga a tezlanish berilganda unga qanchali kuch tasir qiladi.

    #include

    using namespace std;

    int main()

    {float m,a; cin>>m>>a;

    float F=m*a;

    cout<<"F="<

    return 0;}


    1. Zanjiring kuchlanishi U va qarshiligi R. Zanjirdan oqib o`tayotgan to`q kuchini toping.

    #include

    #include

    using namespace std;

    int main()

    {float U,r; cin>>U>>r;

    float I=U/r;

    cout<

    return 0;}



    1. Zanjirlaring R1,R2 va R3 qarshilig o`zaro parallel ulangan. Ularnig umumiy qarshiligini toping. 

     #include

    #include

    using namespace std;

    int main()

    {float r1,r2,r3; cin>>r1>>r2>>r3;

    float R=r1*r2*r3/(r2*r3+r1*r3+r1*r2);

    cout <

    return 0;}



    1. Ifodani yeching



    #include

    #include

    #include

    using namespace std;

    int main()

    {float x,y; cin>>x>>y;

    float C=(x+y)/(y*y+abs((y*y+2)/(x+x*x*x/5)))+exp(y+2);

    cout << setprecision(2)<

    return 0;}


    1. Ifodani yeching

    

    #include

    #include

    #include

    using namespace std;

    int main()

    {float x,y;

    cin>>x>>y;

    float C=(x+y)/(y*y+abs((y*y+2)/(x+x*x*x/5)))+exp(y+2);

    cout << setprecision(2)<

    return 0;}


    1. Ifodani yeching

    #include

    #include

    #include

    using namespace std;

    int main()

    {float x,y; cin>>x>>y;

    float F1=(2*tan(x+M_PI/6))/(1./3+cos(y+x*x)*cos(y+x*x))+(log(x*x+2)/log(2));

    cout<

    return 0;}



    18.Ifodani xisoblang



    Download 65.53 Kb.

    Do'stlaringiz bilan baham:
  •   1   2   3   4




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