Untitled
unknown
plain_text
3 years ago
449 B
3
Indexable
#include <iostream>
using namespace std;
int main()
{
int k, b, x, y;
cin >> k >> b;
cin >> x;
y = k * x + b;
if (y > 0 && x > 0) cout << "I chetvert";
if (y > 0 && x < 0) cout << "II chetvert";
if (y < 0 && x > 0) cout << "III chetvert";
if (y < 0 && x < 0) cout << "IV chetvert";
float k, b, x, y, N;
cin >> k >> b;
cin >> N;
for (int i = 0; 1 < N; i++){
cin >> y;
x = (y - b) / k;
cout << y << endl;
}
}
Editor is loading...