The program uses the scanf function to receive input from the user. It prompts the user to enter the length and width of the rectangle, which are then stored in the variables provided for further calculations.