Use the ceil function in math.h
Code:#include <stdio.h> #include <math.h> int main ( ) { double p = 3.4109; p = ceil( p * 100 ) / 100; printf( "%.2f\n", p ); return 0; }
Use the ceil function in math.h
Code:#include <stdio.h> #include <math.h> int main ( ) { double p = 3.4109; p = ceil( p * 100 ) / 100; printf( "%.2f\n", p ); return 0; }