"can you reverse the number" is the number already reverse by using Mod(%). My question, can it be reversed to normal?
For example, if you enter the number "2552" it'll change to "2+5+5+2", which is correct, but, when you enter another number like "4125" it will change to "5+2+1+4" instead of "4+1+2+5"
Ok, I just entered the programming world, a newcomer
With the "if" can it add "+" without exceeding the number like "4+1+2+5+" there are "+" after "5", how can I delete this extra "+"?
#include <stdio.h>
main(){
int a, b, h=0;
printf("Enter the number : ");
scanf("%d",&a);
printf("%d = ", a);
while(a != 0)
{
b=a%10;
a=a/10;
printf("%d",b);
if(b != a)
{
printf("+");
}
h=h+b;
}
printf(" = %d\n", h);
}