1-mustaqil ish
1-masala
To’g’ri burchakli uchburchakga tushirilgan mediana gipotenuzaning yarmiga teng yani a/2
Dastur kodi
2-masala
Dastur kodi
#include
using namespace std;
class Kompyuter {
public:
string modeli = "Hp";
int operativ_xotira = 4;
string protsessor = "i3";
string vint = "1TB";
void kritish(string modeli1, int operativ_xotira1, string protsessor1, string vint1) {
modeli = modeli1;
operativ_xotira = operativ_xotira1;
protsessor = protsessor1;
vint = vint1;
}
int info() {
cout<<"Kompyuter modeli: "<cout<<"Operativ xotira: "<cout<<"Protsessori: "<
cout<<"Vint: "<}
};
int main () {
Kompyuter kompyuter1;
Kompyuter kompyuter2;
Kompyuter kompyuter3;
kompyuter1.kritish("Hp", 16, "i7", "1TB");
kompyuter2.kritish("MSI", 8, "i5", "1TB");
kompyuter3.kritish("Asus", 4, "i3", "500GB");
kompyuter1.info();
kompyuter2.info();
kompyuter3.info();
return 0;
}
Do'stlaringiz bilan baham: |