fork download
  1. int main() {
  2. float miles, kilometers;
  3. printf("Enter distance in miles: ");
  4. scanf("%f", &miles);
  5. kilometers = miles * 1.60934;
  6. printf("Distance %.1f miles converts to %.2f kilometers.\n", miles, kilometers);
  7. return 0;
  8. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Enter distance in miles: Distance 0.0 miles converts to 0.00 kilometers.