fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. // Declare variables.
  6. int feet_in_mile, yards_in_mile;
  7. int feet_in_yard;
  8.  
  9. // Initialize known values.
  10. yards_in_mile = 1760;
  11. feet_in_yard = 3;
  12.  
  13. // Calculate the number of feet in a mile.
  14. feet_in_mile = yards_in_mile*feet_in_yard;
  15.  
  16. // Output the result.
  17. printf("Yrds in Ml=%d\n\n\nfeet in MI=%d.\n", yards_in_mile, feet_in_mile);
  18. printf("Goodbye!");
  19. return 0;
  20. }
Success #stdin #stdout 0s 5304KB
stdin
Standard input is empty
stdout
Yrds in Ml=1760


feet in MI=5280.
Goodbye!