Asked by
Birds of the sky (2 Golds)
Sunday, 03 Jan 2021, 04:15 AM
at (Education
Tutorials)
|
|
|
|
#include<stdio.h> void call(int n) { int i; if(n>0) { i=n%10; //printf("i = %d ", i); n=n/10; //printf("n = %d\n", n); call(n); printf("%d ", i); } } int main() { int n; scanf("%d", &n); call(n); return 0; } /* Input: 123 output: 1 2 3 */
Answered by
Birds of the sky (2 Golds)
Sunday, 03 Jan 2021, 04:17 AM
|