2025-03-06 23:47:59 +08:00

20 lines
439 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*------------------------------------------------------
题目从键盘输入一个整数n,求2 至 n-1内所有能被n整除的数。
例如输入10 输出 2 5
输入99 输出 3 9 11 33
--------------------------------------------------------*/
#include "stdio.h"
int main ( )
{
int n,i;
printf("input a number:");
scanf ("%d", &n);
/**********Program**********/
for(i=2;i<n;i++)
if(n%i==0)
/********** End **********/
printf ("%d\n",i);
}