fork download
  1. #include <stdio.h>
  2. int main(void) {
  3. int kilos;
  4. float pound, pounds;
  5. pound = 2.20462;
  6. printf("enter the number of kilos to be converted into pounds\n");
  7. scanf("%d", &kilos);
  8. //call the pounds function
  9. pounds = kilos * pound;
  10. printf("the conversion of %d kilos is %f pounds\n", kilos, pounds);
  11. return 0;
  12. }
  13. /* function returning the pounds of kilograms*/
  14. float pounds(float value)
  15. {
  16. return value*value;
  17. }
  18.  
Success #stdin #stdout 0s 2116KB
stdin
Standard input is empty
stdout
enter the number of kilos to be converted into pounds
the conversion of -1217905075 kilos is -2685017600.000000 pounds