exercise5

This commit is contained in:
2025-04-30 02:14:23 +03:00
parent de35a9dd15
commit 991478f774
5 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#include <stdio.h>
#include <math.h>
int main (void) {
double num;
printf("%s\n", "Enter a number!");
scanf("%lf", &num);
int y = floor(num + .5);
printf("%3s\t%3lf\t%3s\t%3d\n", "Orginal num:", num, "Rounded: ", y);
}