fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int number;
  5. float floating= number;
  6. printf("please enter number: ");
  7. scanf("%d",&number);
  8. printf("\n the original number is %d ",number);
  9. printf("\n the flouting number is %f",floating);
  10. printf("\n the floating number is %f",(float)number);
  11.  
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
please enter number: 
 the original number is 32767 
 the flouting number is 32767.000000
 the floating number is 32767.000000