just a quick question about a code I have. hopefully ill be able finish the rest of the code myself after this. I have this code multiply the number I enter by 9 and giving me an answer, how can I carry on this answer to carry out another calculation in the same code, basically I want to add all the numbers up in the answer apart from the last one, I can do this in a different code but I don't no how to join it up to this one.
#include <stdio.h>
#include <conio.h>
int main()
{
int num;
int sum = 0;
printf(" Enter a number above 0 : ");
scanf("%d", &num);
num /= 10;
while (num > 0)
{
sum += num % 10;
num /= 10;
}
printf("Sum = %d", sum);
getch();
return 0;
}