#include <stdio.h>int rec(int num){return (num) ? num%10 + rec(num/10):0;}int main(){printf("%d",rec(4567));}
Standard input is empty
22
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!