0
Q:

print till two decimal places in c

// C program to set precision in floating point numbers 
// using format specifier 
#include<stdio.h> 
  
int main()  
{ 
    float num = 5.48958123; 
  
    // 4 digits after the decimal point   
    printf("%0.4f", num);  
    return 0; 
}
3

New to Communities?

Join the community