Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
455 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main ()
{
    int y,x,n,a[10000];
    float k,b;
    cout << "k = ";
    cin >> k;
    cout << "b = ";
    cin >> b;
    cout << "N = ";
    cin >> n;
    cout << endl;
    for(int i=0; i<n; i++){
        cout << "y(" << i << ") = ";
        cin >> y;
        x=(y-b)/(+k);
        a[i]=x;
    }
    cout << endl;
    for(int i=0; i<n; i++){
        cout << "x(" << i << ") = " << a[i] << endl;
    }
    
}