Pointer - 4

Description:

Write a program to convert floating point values into its integral equivalent using pointer Input and Output Format: All float values are displayed correct to 2 decimal places. All text in bold corresponds to input and the rest corresponds to output. Note: In the floating point value mantissa is more equal or more than 0.50 then add one to the equivalent integer value Refer sample input and output for formatting specification Test Case 1 Input (stdin) 3.49 Expected Output 3 Test Case 2 Input (stdin) 3.50 Expected Output 4

Program :

#include <stdio.h>


#include<math.h>


int main()


{


  float a;


  scanf("%f",&a);


  printf("%.0f",round(a));


​


 return 0;


}