1. ## Seperating Integers

Hello everyone,
I'm looking to write a program that will take a five digit number and proceed to give the sum of the intergers, the average (as a float), the smallest integer and the largest interger. My main problem is just figuring out how to seperate the indivdual integers from the one. I believe I will be able to figure the rest out once that can be done. Thanks.

2. Simple. Just prompt five times for numbers, or use a single scanf line to grab five numbers.

printf("Enter five numbers, each seperated by a space, and hit enter: ");
scanf("%d %d %d %d %d", &var1, &var2....and so on...);

Quzah.

3. yes that would be very easy, although that is one of the objectives of my program, to actually seperate the digits from the larger number.

4. Originally posted by Melon
yes that would be very easy, although that is one of the objectives of my program, to actually seperate the digits from the larger number.
Ah, you should have said that in the first place. It pays to be precise.

Here's a thought:

number = 12345
digit1 = number % 10
number /= 10
digit2 = number % 10
repeat as needed

Quzah.

5. Sorry about that quzah, my mistake. A little habit that I need to break most likely. We'll you were right, that's for sure. I thank you for your help. Hopefully one day I shall feel the pleasure of being able to help other programmers, but for now I'm just a lowly beginner. Thank you again quzah, best of luck to you in the future.