Untitled

 avatar
unknown
c_cpp
10 months ago
304 B
5
Indexable
#include <stdio.h>
int func(long int numb);
main()
{
long number;
int res;
number = 3464569 ;
res func (number);
printf("the number id %ld, the function result is: %d", number, res);
return 0;
}
int func(long int numb)
{
if (numb == 0)
else
return 0;
return ( (numb%10) + func(numb/10)) ;
Editor is loading...
Leave a Comment