fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  
  6.  
  7. float tmp=0.02;
  8. float tmp2=tmp*100;
  9.  
  10. printf("%d\n",tmp2);
  11. printf("%d\n",(int)(tmp2));
  12. printf("%d\n",(int)(tmp*100));
  13.  
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
0
2
1