М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации
olesyamolyanova
olesyamolyanova
31.12.2021 17:55 •  Информатика

Написать программу на паскале. вычислить значение y по одной из формул. y= x+a, если x< 10 x+b, если 10x23 x+, если x> 23

👇
Ответ:
Машка4155
Машка4155
31.12.2021
Var
    x, a, b: real;

begin
    readln(x, a, b);
    
    if x < 10 then
        x := x + a
    else if x > 23 then
        x := x + a * a
    else
        x := x + b;
    writeln(x);
end.
4,6(6 оценок)
Открыть все ответы
Ответ:
kotsdanil778
kotsdanil778
31.12.2021

#include <iostream> // header input/output streams

#include <fstream> // header для работы с файлами

using std::ifstream; // для работы с файлом input.txt

using std::ofstream; // для работы с файлом output.txt

using std::cin; // для работы cin

using std::cout; // для работы cout

using std::endl; // для работы перевода на новую строку endl

int main(){

ifstream in_file;  // input.txt

  ofstream out_file;  //output.txt

   try{

     in_file.open("input.txt");

     out_file.open("output.txt");

   }

  catch(std::exception& e){

     cout << e.what() << endl;

   }

  unsigned int a,b;

  in_file >> a >> b;

  unsigned int sum = a+b -1;

cout << sum;

  out_file << sum - a << ' ' << sum-b << endl;

}

4,6(96 оценок)
Ответ:
stetcenko87
stetcenko87
31.12.2021

#include <iostream> // header input/output streams

#include <fstream> // header для работы с файлами

using std::ifstream; // для работы с файлом input.txt

using std::ofstream; // для работы с файлом output.txt

using std::cin; // для работы cin

using std::cout; // для работы cout

using std::endl; // для работы перевода на новую строку endl

int main(){

ifstream in_file;

  ofstream out_file;

   try{

     in_file.open("input.txt");

     out_file.open("output.txt");

   }

  catch(std::exception& e){

     cout << e.what() << endl;

   }

  unsigned int a,b;

  in_file >> a >> b;

  unsigned int sum = a+b -1;

cout << sum;

  out_file << sum - a << ' ' << sum-b << endl;

}

4,6(47 оценок)
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ