Axborot xavfsizligi 19-17-guruh talabasi Ne’matova Nozima
Variant -15
1-masala
#include
#include
using namespace std;
int main()
{
int a,b,c;
float s,p,d,h;
cin>>a>>b>>c;
h=(a-b)*tan(c*(M_PI)/180)/2;
d=sqrt(pow((a-b)/2,2)+h*h);
p=a+b+2*d;
s=h*(a+b)/2;
cout <<"trapetsiya yuzasi="<
std::cin >> dec;
while (dec > 0) {
rem = dec % 16;
if (rem > 9) {
switch (rem) {
case 10: std::cout << "A"; break;
case 11: std::cout << "B"; break;
case 12: std::cout << "C"; break;
case 13: std::cout << "D"; break;
case 14: std::cout << "E"; break;
case 15: std::cout << "F"; break;
}
}
else {
std::cout << rem;
}
dec = dec / 16;
}
}
Do'stlaringiz bilan baham: |