2025-03-06 22:45:14 +08:00

23 lines
447 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.

/*-------------------------------------------------------
《孙子算经》中有这样一道算术题:“今有物不知其数,三三数之剩二,五五数之剩三,七七数之剩二,问物几何?” (注使用while循环
-------------------------------------------------------*/
#include <stdio.h>
main()
{
int i;
i=1;
/**********Program**********/
while(1){
if(i%3==2&&i%5==3&&i%7==2)
/********** End **********/
{
printf("%d\n",i);
break;
}
i++;
}
}