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;
  8. cout << "x = 1 : y = " << k + c;
  9. cout << "x = 5 : y = " << k * 5 + c;
  10. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
x = 0.1 : y = 0.000478093x = 1 : y = 0.00478093x = 5 : y = 0.0239046