#include
#include
int main(void)
{
int mem;
for( mem = 300; mem <= 400; mem++ )
{
if( (mem % 3 == 2) && ( mem % 5 == 2) && (mem % 7 == 4) )
break;
}
printf("Mem number is: %d \n", mem);
return 0;
}
[13:56:35] incle 说: 或者这样也行:
[13:56:36] incle 说:
mem = 300;
while( mem <= 400 )
{
if( (mem % 3 == 2) && ( mem % 5 == 2) && (mem % 7 == 4) )
break;
mem++;
}
================
class aa
public static void mian(string[] arge)
{
int x;
for(x=300;x<=400;x++0)
if(x/3=2)
{if(x/5=2){if(x/7=4)
System.out.pointln(x);}}
}
阅读(2104) | 评论(0) | 转发(0) |