Wednesday, May 17, 2017

Lab 1 Task 5

#include <stdio.h>
#include <math.h>

int main (void)
{
        int result = 0;
        float i = 0;
        scanf("%f", &i);
        while (result != EOF)
        {
                printf("%d %d %d\n", (int)floor(i), (int)round(i), (int)ceil(i)$
                result = scanf("%f",&i);
        }
        printf("Done.\n");
        return 0;
}


No comments:

Post a Comment