Відповідь:
#include <iostream>
using namespace std;
int main(){
setlocale(LC_ALL , "Rus");
int a,b,c;
cout << "Введите a: ";
cin >> a;
if(a < 0){
cout << "Число a - отрицательное" << endl;
return 0;
}
cout << "Введите b: ";
cin >> b;
if(b < 0){
cout << "Число b - отрицательное" << endl;
cout << "Введите c: ";
cin >> c;
if(c < 0){
if(a > 0 && b > 0 && c > 0){
cout << "Все числа положительные..." << endl;
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Відповідь:
#include <iostream>
using namespace std;
int main(){
setlocale(LC_ALL , "Rus");
int a,b,c;
cout << "Введите a: ";
cin >> a;
if(a < 0){
cout << "Число a - отрицательное" << endl;
return 0;
}
cout << "Введите b: ";
cin >> b;
if(b < 0){
cout << "Число b - отрицательное" << endl;
return 0;
}
cout << "Введите c: ";
cin >> c;
if(c < 0){
cout << "Число b - отрицательное" << endl;
return 0;
}
if(a > 0 && b > 0 && c > 0){
cout << "Все числа положительные..." << endl;
}
return 0;
}