برچسب‌ها

۱۳۸۸ آذر ۱۴, شنبه

برنامه مشخص کننده اینکه عددی بر 3 یا 7 بخشپذیر است یا نه

int main()
{
int x;
printf("insert a number:");
scanf("%d",&x);
if(x%3==0)
printf("\nthe number on 3 is true");
else printf("\nthe number on 3 is false");
if(x%7==0)
printf("\n\nthe number on 7 is true");
else printf("\n\nthe number on 7 is false");
getch();
}

هیچ نظری موجود نیست:

ارسال یک نظر