I need some help with average calculation. I have a homework where i must find average value, but this one is quite tricky, atleast for me. usualy it goes like that 1+2 average is 1,5.
I have to do it like this:

If i input 15 then program should understand that as 1+5 and average of that is 3.

You will need a variable of type float or double to store and print the average

You can use modulo arithmetic to get the digits of a number (%)

These two hints should point you in the right direction. Let me know if I am being too vague but I am trying to give you a hint without telling you exactly what to do... ;)

Welcome aboard. A few things additionally. This is an outline:

<Your headers>
using namespace std;
int main ()
{
1. declare a few variables...int, float...
2. cout<<"enter two numbers to get the average"<<endl;//ask the user ro input two digits.
3. cin>>num1>>num2;//makes the user enter two numbers
4. You get the total of the numbers and then divide by the amt of numbers/digits.
5. You can figure out the rest. Hope this helps.

You will need a variable of type float or double to store and print the average

You can use modulo arithmetic to get the digits of a number (%)

These two hints should point you in the right direction. Let me know if I am being too vague but I am trying to give you a hint without telling you exactly what to do... ;)

I understand and respect that, but since im kinda new to this thing, could you please point the direction where should I look for some info on modulo arithmetic? google seems to find alot except basics on this.

Welcome aboard. A few things additionally. This is an outline:

<Your headers>
using namespace std;
int main ()
{
1. declare a few variables...int, float...
2. cout<<"enter two numbers to get the average"<<endl;//ask the user ro input two digits.
3. cin>>num1>>num2;//makes the user enter two numbers
4. You get the total of the numbers and then divide by the amt of numbers/digits.
5. You can figure out the rest. Hope this helps.

Thanks, but the hardest thing in this assingment is that I dont need to input 2 digits, I know how to do that :)

It goes like this, I input one digit, lets say 15 for example, the program should understand this one digit as 1+5 and calculate its average. 1+5=6/2 = 3 like this :)

>>modulo arithmetic
Not much to it -- modulo is the result after division. For example 15/10 = remainder 5. So 15 % 10 = 5. 27 % 10 = 7. After that just do normal division by 10 to remove the last digit from the number.

Ok...thx for spotting that. Age....what else to blame. Pretty straight-forward assignment. To original poster. If your professor requires you to do it for a larger number...let's say....a 6 digit number, then you'll have to use the operations 6 times.

Hello Friends,
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...