Ò»¸ö¼òµ¥µÄcÑ»·¿ØÖÆÌâ
Ò»¸öÊýÈç¹ûºÃµÈÓÚËüµÄÒò×ÓÖ®ºÍ£¬Õâ¸öÊý¾Í³ÉΪ"ÍêÊý",ÀýÈç6µÄÒò×ÓΪ1£¬2£¬3¶ø6=1+2+3,¶ø6=1+2+3,Òò´Ë6ÊÇ¡°ÍêÊý".±à³ÌÐòÕÒ³ö1000Ö®ÄÚµÄËùÓÐÍêÊý£¬²¢°´ÏÂÃæ¸ñʽÊä³öÆäÒò×Ó£º6 its factors are 1,2,3
ÎҵijÌÐòÈçÏ ¿É½á¹û´íÁË Ï£Íû´óϺ°ï¸ÄÒ»ÏÂ
#include <stdio.h>
#include <conio.h>
void judge(int s)
{
int i,a[20],k = 0,sum = 0;
for(i = 1;i < s;i++)
if(s % i == 0 && i != s)
a[k++] = i;
for(i = 0;i < k;i++)
sum = sum + a[k];
if(sum == s)
{
printf("%d",s);
printf("its factors are ");
for(i = 0;i < k;i++)
printf("%d,",a[i]);
printf("\n");
}
}
void main()
{
int i;
clrscr();
for(i = 0;i < 1000;i++)
judge(i);
getch();
}
C/C++ code:
sum = sum + a[i];
Äã´æ´¢Êý¾ÝµÄÊý×é²»¹»´ó£¬»á³öÏÖÔ½½ç´íÎó¡£
¸Ä³É£ºint a[200],ÕâÑù³ÌÐò¾Í²»»á³öÏÖ´íÎóÁË¡£
ͬÒâÂ¥ÉϵÄ˵·¨£¬¶¨Òå³Éa¡¾20¡¿¾Í»á³öÏÖÔ½½ç´íÎó£¬ÁíÍâsum=sum+a¡¾i¡¿Ó¦¸ÃÊÇÄãÊèºöÁË°É¡£¡£¡£
kºÃÏñÐèÒª¹éÁ㣬¶øÇÒºÃÏñȱÉÙ{}À¨ºÅ£¬³ÌÐòÁ÷³Ì²»ÊÇÄãµÄ±¾Òâ·½Ïò¡¡
Ïà¹ØÎÊ´ð£º
ÔÚ²éѯºó½«²éѯ³öÀ´µÄÖµ¸³¸ø¸÷ÊäÈë¿ò
<c:if test="${not empty dataValue}">
fm.SAMPLING_DATE.value=" <c:out value='${dataValue.SAMPLING_DATE}'/ ......
pro*c ÀïÔõô½«select µÄ·µ»ØÄÚÈݸ³Öµ¸ø±äÁ¿ÄÇ£¿
EXEC SQL BEGIN DECLARE SECTION;
char CALLNO[30];
EXEC SQL END DECLARE SECTION;
EXEC SQL SELECT CALLNO ......
C/C++ code:
#include <stdio.h>
typedef struct node{
int *key;
int length;
}node;
void insert(node &temp,int n)
{
int i,j;
for(i=0;i<=temp.length;i++)
{
......
GCCÊÇÃâ·ÑµÄÂð£¿ÄÇÓУ¿
LINUXϵͳÔõôװ£¿
ÖÐÎÄÔõôÉèÖã¿
Äã×°ÍêLinuxϵͳ¾Í»á×Ô´øGCC£¬windowsÏÂÒ²ÓÐGCC£¬±ÈÈçdev-c++,CODE::Blocks
linuxϵͳ°²×°¸ù¾Ý²»Í¬µÄlinux°æ±¾ÍøÉ϶¼Óн̳̣¬¿´ÏÂ¾Í ......
É¢·Ö£¬ÎªC£¯C++ÂÛ̳Ôö¼ÓµãÈËÆø£¡£¡
jf
jf£¬Â¥Ï±£³Ö¶ÓÐÎ
Ö»¼û¹ý²»¸ÒÉ¢·ÖµÄ£¬Ã»¼û¹ý²»¸Ò½Ó·ÖµÄ
½Ó
Ç°ÅÅÁôÃû
jf
ÕâÀïÈËÆø»¹²»´í°¡£¡
½Ó·Ö ¡¡ C/C++ºÃÈÈÄֶÆäËû°æ¿é¾ÍÏà¶ÔûÕâôÈÈÁË
......