English
Open in Telegram

ThreadAssalomualeykum shunga yordam bervorila

5 messages · –
  1. D
    #include <iostream> #include <bits/stdc++.h> using namespace std; namespace Dasturchi_1{ class Uch{ private: double a; double b; double c; public: void setA(double x) { this->a = x; } void setB(double x) { this->b = x; } void setC(double x) { this->c = x; } double getA() { return this->a; } double getB() { return this->b; } double getC() { return this->c; } void perimetr() { cout<<"\nDasturchi_1 fazosi: P = "<<this->a + this->b + this->c<<endl; } void yuza() { double p = (this->a + this->b + this->c)/2; double s = sqrt(p*(p-a)*(p-b)*(p-c)); cout<<"\nDasturchi_1 fazosi: S = "<<s<<endl; } }; } namespace Dasturchi_2{ class Uch{ private: double a; double b; double c; public: void setA(double x) { this->a = x; } void setB(double x) { this->b = x; } void setC(double x) { this->c = x; } double getA() { return this->a; } double getB() { return this->b; } double getC() { return this->c; } void perimetr() { cout<<"\nDasturchi_2 fazosi: P = "<<this->a + this->b + this->c<<endl; } void yuza() { double p = (this->a + this->b + this->c)/2; double s = sqrt(p*(p-a)*(p-b)*(p-c)); cout<<"\nDasturchi_2 fazosi: S = "<<s<<endl; } }; } using namespace Dasturchi_1; using namespace Dasturchi_2; int main() { Dasturchi_1::Uch uch; Dasturchi_2::Uch uch2; double a, b, c, a1, b1, c1; cin>>a>>b>>c; cin>>a1>>b1>>c1; uch.setA(a); uch.setB(b); uch.setC(c); uch2.setA(a1); uch2.setB(b1); uch2.setC(c1); uch.perimetr(); uch.yuza(); uch2.perimetr(); uch2.yuza(); return 0; }
CC++ vs PythonC++ vs Python@cpp_vs_python · group · Tech
114members39 409messages in the index
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · Index limits · Remove a page · Catalog · Search · How we count