Skip to content

Instantly share code, notes, and snippets.

@rhysforyou
Created March 11, 2012 08:35
Show Gist options
  • Select an option

  • Save rhysforyou/2015616 to your computer and use it in GitHub Desktop.

Select an option

Save rhysforyou/2015616 to your computer and use it in GitHub Desktop.
// Break this up into km, m, and cm
kilometres = sum / 100000;
metres = (sum / 100) % 1000;
centimetres = sum % 100;
// Output the final value as a formatted string
printf("\n%d %d %d\n", kilometres, metres, centimetres);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment