Простая программа на C++ для вычисления аргумента линеиной функции
.gif)
/* * File: LinearFunction.cpp * ------------------ * Linear finction calculation simple program. */ #include using namespace std; int main(){ int a = 0; int b = 0; int min = 0; int max = 0; cout << "This program finds y and x in function y = ax + b" << endl; cout << "Enter value of a : " ; cin >> a; cout << "Enter value of b : " ; cin >> b; cout <<"Enter x minimal value: "; cin >> min; cout <<"Enter x maximal value: "; cin >> max; cout <<"Now the program will give out arguments of function y = ax + b for x from " << min << " to " << max << endl; for (int x = min; x <= max; x++){ double y = a*x + b; cout << y << endl; } }