QUOTE(noor.mz143 @ 7 Feb, 2007 - 01:11 AM)

tell me how to write a program to scnaf number and print it in reverse order either in C or C++ thanks.
also how to write a program to find the sum of digits enterd by the user in C or C++
You can take integer from user and use "div and mod" method for reversing as well as calulating sum of digits in a number.
Well have a look on this
CODE
void main()
{
int num,sumOfDigits=0;
printf("Enter Number : ");
scanf("%d",&num);
printf("Reversed Number is : ");
while(num>0)
{
sumOfDigits += num%10;
printf("%d",num%10);
num /=10;
}
printf("\nSum Of Digits is : %d",sumOfDigits);
}
now validations like numbers should be within range of integer and it should be positive etc etc.... you can take care of it.