TATU Akt yo’nalishi kasb ta’limi fakulteti 620-20 guruh talabasi Sobirov Xusniddinning
5-dedline topshirig’i
#include
using namespace std;
class TortBurchak{
private :
int a; int b; int h ;
float asosyuzi;
float piramidayuzi;
float apofema;
float piramidahajmi;
public :
void setParametr(int a1, int b1, int h1, float apo){
a = a1 ;
b = b1;
h = h1;
apo = apofema;
}
float asosYuzi(){
asosyuzi = 0.87 * a * a ;
return asosyuzi; }
float piramidaYuzi(){
piramidayuzi = asosyuzi + 3 * a * apofema;
return piramidayuzi;
}
float hajm(){
piramidahajmi = (asosyuzi * h)/3;
return piramidahajmi;
} };
int main()
{ TortBurchak X1;
X1.setParametr(4,5,6,10);
cout<<"Piramida asosining yuzi = "<
cout<<"Piramida asosining yuzi = "<
cout<<"Piramida asosining yuzi = "<
return 0;
}
Do'stlaringiz bilan baham: |