Saturday, August 18, 2018

IO 22


  • Problem Description

    Given an input as integer to the machine , he need to get the output of corresponding floating point number with five digit after decimal points. Please help him to write the program that satisfy the output.

    Input and Output Format:

    Refer sample input and output for formatting specification.

    All text in bold corresponds to input and the rest corresponds to output
  • CODING ARENA
  • #include <stdio.h>
    int main()
    {
      int a;
      float b;
      scanf("%d",&a);
      b=(float)a;
      printf("%0.6f",b);
      printf("\n%d",a);
      return 0;
    }
  • Test Case 1

    Input (stdin)
    12
    
    
    Expected Output
    12.000000
    
    12
  • Test Case 2

    Input (stdin)
    15
    
    
    Expected Output
    15.000000
    
    15

1 comment: