fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int cm;
  5. double foot,inch;
  6. double m;
  7.  
  8. scanf("%d",&cm);
  9.  
  10. m = cm/100;
  11. foot = m/0.3048;
  12. inch = (m-foot*0.3048)/0.0254;
  13.  
  14. printf("%d %d",foot,inch);
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5320KB
stdin
170
stdout
1 0