Language: C Programming // produce result: 12 12 12 13 13 13 13 0 Hooray! (This
ID: 3744957 • Letter: L
Question
Language: C Programming
// produce result:
12
12
12
13
13
13
13
0
Hooray! (This will print even if you're not getting the correct results.)
int round_up_or_down(double dub);
int main(void)
{
printf("%d ", round_up_or_down(12.00)); // expected result: 12
printf("%d ", round_up_or_down(12.10)); // expected result: 12
printf("%d ", round_up_or_down(12.49)); // expected result: 12
printf("%d ", round_up_or_down(12.50)); // expected result: 13
printf("%d ", round_up_or_down(12.51)); // expected result: 13
printf("%d ", round_up_or_down(12.89)); // expected result: 13
printf("%d ", round_up_or_down(12.90)); // expected result: 13
printf("%d ", round_up_or_down(0.000)); // expected result: 0
printf(" Hooray! (This will print even if you're not getting the correct results.) ");
return 0;
}