Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- CH-230-A
- a3_p3.c
- Christopher Mclaughlan
- c.mclaughlan@jacobs-university.de
- */
- #include <stdio.h>
- int main()
- {
- int cm;
- scanf("%d", &cm);
- float new = convert(cm);
- printf("%f", new);
- return 0;
- }
- float convert(int cm) {
- float km = cm / 1000.0;
- printf("km=%f\n", km);
- return km;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement