Contact: aviboots(AT)netvision.net.il
39,970 questions
51,912 answers
573 users
#include <stdio.h> #include <math.h> int main(void) { printf("%.2f\n", roundf(3.14)); printf("%.3f\n", roundf(4.6)); printf("%.4f\n", roundf(-1.3)); return 0; } /* run: 3.00 5.000 -1.0000 */