#include <stdio.h> /* 判斷一個數能不能同時被3和5整除 --------soulsjie 20170525----- */ void main(){ int input; printf("請輸入一個數:"); scanf("%d",&input); if(input%3==0 && input%5==0) { printf("%d能同時被3和5整除!\n",input); } else{printf("%d不能同時被3和5整除",input);} }

#include <stdio.h> /* 判斷一個數能不能同時被3和5整除 --------soulsjie 20170525----- */ void main(){ int input; printf("請輸入一個數:"); scanf("%d",&input); if(input%3==0 && input%5==0) { printf("%d能同時被3和5整除!\n",input); } else{printf("%d不能同時被3和5整除",input);} }

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。