Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- float convertToCm(float feet, float inches);
- int main() {
- float x, y;
- scanf("%f %f", &x, &y);
- printf("%.2f", convertToCm(x, y));
- return 0;
- }
- float convertToCm(float feet, float inches) {
- feet *= 30.48;
- inches *= 2.54;
- return feet + inches;
- }
Advertisement
Add Comment
Please, Sign In to add comment