fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5.  
  6. double x = 23.6;
  7. printf("%d руб. %02d коп.", (int)x, (int)(x*100)%100 );
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
23 руб. 60 коп.