Есть ответ 👍

Написать программу, которая считывает с клавиатуры два целых числа и выводит их частное c++

226
228
Посмотреть ответы 2

Ответы на вопрос:


#include "iostream"

#include "stdlib.h"

#include "locale.h"

using namespace std;

int main(){

setlocale(lc_all,"rus");

int a, b;

cout < < "введите число a: "; cin > > a;

cout < < "введите число b: "; cin > > b;

if(b ! = 0){

  cout < < "частное: " < < a/b < < endl;

}else cout < < "ошибка! деление на 0! " < < endl;

system("pause");

return 0;

}


Var a,b,c: real; begin readln(a,b,c); if (b> 0) and (a > 0) and (c > 0) then write((c+a+b): 0: 0); if (b> 0) and (a> 0) and (c< 0) then write((a+b): 0: 0); if (b> 0) and (a< 0) and (c> 0) then write((b+c): 0: 0); if (b< 0) and (a> 0) and (c> 0) then write((a+c): 0: 0) end.

Популярно: Информатика