manyugina1
?>

Ввести два числа а и б. большее число заменить утроенным произведением , меньше полусуммой

Информатика

Ответы

aleksagrbec39
Var a,b:integer;
begin 
writeln('a=');
readln(a);
writeln('b=');
readln(b);
if (a>b) then  begin 
b:=(a+b)/2;
a:=3*(a*b);
 end
else 
begin 
a:=(a+b)/2;
b:=3*(a*b);
end;
writeln('a=',a, ' b=', b);
readln;
end.
coalajk
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64

#include <iostream>
#include <string>
#include <vector>
#include <utility>

int main()
{
    std::vector<std::pair<std::string, std::string>> deriv_sheet = {
        std::make_pair("2x^5", "10x^4"),
        std::make_pair("cosx", "-sinx")
    };
    std::string user_fx;
    std::cin >> user_fx;
    for (const auto& i : deriv_sheet )
        if (i.first.compare(user_fx) == 0)
            std::cout << i.second;
}
avon-central
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64
#include <iostream>
#include <bitset>
#include <sstream>

const size_t hex(const std::string& number)
{
    size_t u_num = 0U;
    std::istringstream ost(number);
    ost >> std::hex >> u_num;
    return u_num;
}

template <typename L, typename R>
const size_t& calculate(const L& l, const R& r)
{
    return std::bitset<16>(l).to_ulong() + std::bitset<16>(r).to_ulong();
}

int main()
{
    std::cout << calculate(hex("7c"), 5) << std::endl;
    std::cout << calculate("11", hex("1d")) << std::endl;
}

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Ввести два числа а и б. большее число заменить утроенным произведением , меньше полусуммой
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

ЕленаАлександровна381
k075ko8
Larax0819
solonataly5
dokurova634
Salkinserg
Кислинская1055
istok11
Lomakina-Valerievna1779
ooo-helpvet44
msk27
Аверьянова
Petrosienko_Larisa,1908
arina2403423
byfetvostochniy