Homework Assignment #1

Write a C program that prompts the user to enter two 4-digit integers. For each of the 4-digit integers, your program should calculate and display each of the four digits, the sum of the digits, and the product of the digits. Finally, your program must calculate and display the quotient and remainder of dividing the first 4-digit integer by the second 4-digit integer.

SAMPLE EXECUTION (user input is represented by blue italics)
Enter the first 4-digit integer: 8652
Enter the second 4-digit integer: 125

The first digit of 8652 is 8
The second digit of 8652 is 6
The third digit of 8652 is 5
The fourth digit of 8652 is 2
The sum of the digits is 21
The product of the digits is 480

The first digit of 125 is 0
The second digit of 125 is 1
The third digit of 125 is 2
The fourth digit of 125 is 5
The sum of the digits is 8
The product of the digits is 0

8652 divided by 125 is 69 remainder 27