round function in C
#include <stdio.h>
#include <math.h>
int main() {
double num = 3.14;
double rounded = round(num);
printf("Original number: %f\n", num);
printf("Rounded number: %f\n", rounded);
return 0;
}
#include <stdio.h>
#include <math.h>
int main() {
double num = 3.14;
double rounded = round(num);
printf("Original number: %f\n", num);
printf("Rounded number: %f\n", rounded);
return 0;
}