/*Output Section */
printf ("\nThat height is equivalent to " "%1f" " feet and " "%2f" " inch(es).\n");
scanf ("%f", &FEET);
scanf ("%f", &INCHES);

Recommended Answers

All 2 Replies

The printf() statement contains %s and %f, but there are no arguments for them

char message[] = "Hello World";
printf("%s\n", message);

In the above, mssage is passed as an argument to printf(). Your printf() needs similar arguments.

/*Output Section */
printf ("\nThat height is equivalent to " "%1f" " feet and " "%2f" " inch(es).\n");
scanf ("%f", &FEET);
scanf ("%f", &INCHES);

This is how you add quotes to the specifiers and those are the correct parameters if you want to control the output of the floats.

printf ("\nThat height is equivalent to \"%.2f\" feet and \"%.2f\" inch(es).\n", feet, inches);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.