Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- double cifri(int n) {
- if (n==0)
- return 1;
- else {
- return n%10*cifri(n/10);
- }
- }
- int main() {
- int x;
- float y;
- scanf("%d",&x);
- y=cifri(x)/(double)x;
- printf("%.2f", y);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement