Use snprintf
Separate declaration for each int; fix going past bounds