ali7100
جمعه 24 دی 1389, 12:40 عصر
با سلام منظور از if(x)دراین برنامه چیست؟
لطفا اگر می شود درباره این برنامه هم کمی توضیح دهید؟ #include<stdio.h>
#include<conio.h>
void maghloob(int x){
if (x){
printf("%d",x%10);
maghloob(x/10);
}
}
int main(void){
int x;
printf("Eneter an integer number:");
scanf("%d",&x);
while (x%10==0)
x=x/10;
printf("\nmaghloob=");
maghloob(x);
getch();
}
لطفا اگر می شود درباره این برنامه هم کمی توضیح دهید؟ #include<stdio.h>
#include<conio.h>
void maghloob(int x){
if (x){
printf("%d",x%10);
maghloob(x/10);
}
}
int main(void){
int x;
printf("Eneter an integer number:");
scanf("%d",&x);
while (x%10==0)
x=x/10;
printf("\nmaghloob=");
maghloob(x);
getch();
}