Untitled
unknown
plain_text
3 years ago
410 B
5
Indexable
#include <iostream>
using namespace std;
int main()
{
float k, b, x, y;
cin >> k >> b;
cin >> x;
y = k * x + b;
while (true) {
if (x > 0 || y > 0) {
cout << "I";
break;
};
if (x < 0 || y > 0) {
cout << "II";
break;
};
if (x < 0 || y < 0) {
cout << "III";
break;
};
if (x > 0 || y < 0) {
cout << "VI";
break;
}
else break;
}
}
Editor is loading...