Дан равнобедренный треугольник ( катет-А и гипотенуза B,площадь S и высота H);составить программу которая по заданному значению выводила бы параметры: ПРИМЕР: из A B S H,из них к примеру выбираем H — C++(Си)

#include <iostream.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
 
void main()
{
    clrscr();
 
    float H = 0, S = 0, A = 0, B = 0;
    char *str;
    cin >> str;
 
    if(strstr(str, "H")){
        H = atof((const char*)&str[2]);
        cout << "Formula s H = " << H;
    }
 
    if(strstr(str, "S")){
        S = atof((const char*)&str[2]);
        cout << "Formula s S = "<< S;
    }
 
    if(strstr(str, "A")){
        A = atof((const char*)&str[2]);
        cout << "Formula s A = " << A;
    }
 
    if(strstr(str, "B")){
        B = atof((const char*)&str[2]);
        cout << "Formula s B = " << B;
    }
    getch();
}

One Thought to “Дан равнобедренный треугольник ( катет-А и гипотенуза B,площадь S и высота H);составить программу которая по заданному значению выводила бы параметры: ПРИМЕР: из A B S H,из них к примеру выбираем H — C++(Си)”

  1. It’s very interesting! If you need help, look here: hitman agency

Leave a Comment