Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
223 B
1
Indexable
Never
include <stdio.h>

int main() {

num, rev=0,sum=0;

int

printf("enter

a number");

scanf("%d", &num)

while (num>0) {

;

sum=sum+num%10;

rev=rev*10+num%10;

num=num/10;

}

printf("sum-%d\nrev-%d", sum, rev);

return 0;