int main(int argc, char* argv[]) { double number; printf("Enter a numer: "); scanf("%lf", &number); printf("Nearest Integer: %f\n", roundToInteger(number)); printf("Nearest Tenths: %f\n", roundToTenths(number)); printf("Nearest Hundreths: %f\n", roundToHundreths(number)); printf("Nearest Thousandths: %f\n", roundToThousandths(number)); return 0; }
int main (void) { float x; // Ask the user to enter a number printf("%s", "Enter a number: "); scanf("%f", &x); // Calculate the values roundToInteger(x); roundToTenths(x); roundToHundredths(x); roundToThousandths(x); puts(""); } // end main