Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have a same issue too #406

Open
hoang1904 opened this issue Feb 16, 2022 · 1 comment
Open

I have a same issue too #406

hoang1904 opened this issue Feb 16, 2022 · 1 comment

Comments

@hoang1904
Copy link

hoang1904 commented Feb 16, 2022

i have a some problems
anyones help mee :(((

#include<stdio.h>
int soChuSo(int n){
if(n==0)
return 0;
return 1+soChuSo(n/10);
}

int tongChuSo(int n){
if(n>0)
return n%10+tongChuSo(n/10);
return 0;
}

int main(){
int n;
printf("Nhap so nguyen n: ");
scanf("%d",&n);
printf("So n co %d chu so\n",soChuSo(n));
printf("Tong cac chu so cua n la: %d\n",tongChuSo(n));
return 0;
}
image

Originally posted by @hoang1904 in #243 (comment)

@hoang1904
Copy link
Author

I write it on VScode and it fails but on Dev C it doesn't

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant