Bajaruvchi: saidov nozim tekshiruvchi: odilbek dauletov


Download 105.8 Kb.
bet1/2
Sana29.11.2020
Hajmi105.8 Kb.
#154969
  1   2
Bog'liq
2 5327891576179919443


713-20 guruh alabasi Saidov Nozimning dasturlash fanidan bajargan labaratoriya mashg’uloti

BAJARUVCHI: SAIDOV NOZIM

TEKSHIRUVCHI: ODILBEK DAULETOV

7-mashq


  1. Kvadratning yuzini va perimetrini hisoblovchi funksiya yarating. Ushbu funksiya yordamida a,b,c,d tomonga ega bo’lgan kvadratni hisoblang.

  2. Kvadrat tenglamaning izdizlar sonini va ildizlarini aniqlovchi funksiya hosil qiling.

BAJARISH:

a) #include

#include

using namespace std;

void sum(int a);

int main()

{ int a,b,c,d;

cin>>a>>b>>c>>d;

sum(a);

sum(b);


sum(c);

sum(d);


return 0;

}

void sum(int a){



int s,p;

s = a*a;


p = 4*a;

cout<<"tomoni = "<

cout<<"yuzasi= "<

cout<<"perimetri= "<




}

using namespace std;

void sum(int a);

int main()

{

int a,b,c,d;



cin>>a>>b>>c>>d;

sum(a);


sum(b);

sum(c);


sum(d);

return 0;

}

void sum(int a){



int s,p;

s = a*a;


p = 4*a;

cout<<"tomoni = "<

cout<<"yuzasi= "<

cout<<"perimetri= "<




}

b) #include


Download 105.8 Kb.

Do'stlaringiz bilan baham:
  1   2




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