713-20 guruh alabasi Saidov Nozimning dasturlash fanidan bajargan labaratoriya mashg’uloti
BAJARUVCHI: SAIDOV NOZIM
TEKSHIRUVCHI: ODILBEK DAULETOV
7-mashq
Kvadratning yuzini va perimetrini hisoblovchi funksiya yarating. Ushbu funksiya yordamida a,b,c,d tomonga ega bo’lgan kvadratni hisoblang.
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
Do'stlaringiz bilan baham: |