When you add num%10 to sum you need to test if its a even number.A number is even if the number % 2 == 0 meaning that the remainder of the number divided by 2 is 0 since all even number are divisible by 2.
using namespace std;
int sum = 0 , num=10,cnt=0;
cout<<"Sum all even digits of a given number \n\n\n";
cout<<"Number = "<<num<<"\n\n\n";
while(cnt < num)
if (cnt % 2 ==0)
cout<<cnt<<" + ";
cout<<" = "<<sum<<" \n\n\n";
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 ...