I don't remember where is the link, but you can do it easily just like that.

From the analog port put some resistors in series to 5V. t the joints of the resistors put switch to ground. So every switch will result in different voltage at the ADC input. No switch pressed, the ADC will read 255 or 1023 (8 or 10 bit result).

Ioannis