fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float k, c;
  6. cin >> k >> c;
  7. cout << "x = 0.1 : y = " << k * 0.1 + c << endl;
  8. cout << "x = 1 : y = " << k + c << endl;
  9. cout << "x = 5 : y = " << k * 5 + c;
  10. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
x = 0.1 : y = 1.06316e-32
x = 1 : y = 1.06316e-31
x = 5 : y = 5.31579e-31