int printf (
char* format, ...);
where
format is one of the following:
"%hd" or "%hi" - signed short int
"%hu" - unsigned short int
"%d" or "%i" - signed int
"%u" - unsigned int
"%ld" or "%li" - signed long int
"%lu" - unsigned long int
"%f" - float
"%lf" - double
"%Lf" - long double
"%hx" - unsigned hexadecimal short int (lowercase letters)
"%x" - unsigned hexadecimal int (lowercase)
"%lx" - unsigned hexadecimal long int (lowercase)
"%hX" - unsigned hexadecimal short int (uppercase letters)
"%X" - unsigned hexadecimal int (uppercase)
"%lX" - unsigned hexadecimal long int (uppercase)
"%ho" - signed octal short int
"%o" - signed octal int
"%lo" - signed octal long int
"%c" - single character
"%s" - string of characters (character array, a.k.a. "C(-style) string" or "ASCIIZ string")
"%p" - pointer address
"%n" - nothing printed, but the argument should be a signed int where the number of characters written so far should be stored
"%%" - output a percent (%) sign (since the percent sign is reserved for denoting the position where arguments should be inserted)
I hope that helps. Link for ALL of the specifics of the format string for the printf/scanf family of functions:
printf - C++ Reference
Edit:
Regarding the "illegal default" error, make sure your default case is inside the switch statement and that you closed the switch statement (sometimes you might close the switch statement accidentally or leave it open when it shouldn't be).