Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

C/C++ѧϰ±Ê¼Ç[01].×ÝÏò´òÓ¡ÕûÊý

#include <stdio.h>
#include <string.h>
#include <math.h>
#define BASE 10
int intlen(long n);
int main()
{
int i, j, num, sz;
i = j = num = sz = 0;
if (!scanf("%d", &num) || num <= 0) {
printf("invalid input\n");
return 1;
}
sz = intlen(num);
for (i = sz; i > 0; i--) {
for (j = 1; j <= num; j++) {
printf("%d",(j % (int) (pow(BASE,i))) / (int) (pow(BASE,i - 1)));
}
printf("\n");
}
return 0;
}
int intlen(long n)
{
return log10(fabs(n)) + 1;
}
/* vim: set ts=4 sw=4: */

´Ó±ê×¼ÊäÈë½ÓÊÕÒ»¸ö´óÓÚ0µÄÕûÊý,ÊúÏò´òÓ¡1-Õâ¸öÊýÖ®¼äµÄÊý
Óõ½Á˶ÔÊýº¯ÊýÈ¡ÕûÊýµÄλÊý,È¡Ä£ÔËËã,Õû³ýÔËËã,Ö¸ÊýÔËËã


Ïà¹ØÎĵµ£º

ubuntu°²×°c/c++¼¯³É¿ª·¢»·¾³

Ê×ÏÈÈ·±£ÏµÍ³ÒѾ­°²×°ÁËgcc/g++
1> Anjuta
´ò¿ªÖÕ¶Ë:
ÃüÁî:sudo apt-get install anjuta
£¨²»ÄÜ°²×°µÄÐèÒªÌí¼Ó°²×°Ô´
Ìí¼ÓÔ´£ºµã»÷Ö÷²Ëµ¥Éϵēϵͳ”¡·“ϵͳ¹ÜÀ픡·“Èí¼þÔ´”£¬ÊäÈëÃÜÂëºó£¬ÔÚ³öÏֵĶԻ°¿òÖе㓵ÚÈý·½Èí¼þ”£¬
“deb http://anjuta.org.sixxs. ......

CµÄTXTµç×ÓÊéÔĶÁÆ÷£¨DOS£©

¿ÉϧMS-DOS²»ÊÇÖйúÈËдµÄ£¬²»Ö§³ÖÖÐÎÄ¡£
/* Note:Your choice is C IDE */
#include "stdio.h"
main(int argc, char *argv[])
{
FILE *fp;
char ch;
int num=0,max;
int line=0;
if((fp=fopen(argv[1],"rt"))==NULL)
{
printf("\nCannot open file strike any key exit!");
getch();
exit(1);
......

LINUXÏÂI2C×ÜÏßÊÊÅäÆ÷³õʼ»¯µ÷ÓÃÁ´

ÒÔ i2c-mpc.c Çý¶¯Ä£¿éΪÀý
fsl_i2c_init -> of_register_platform_driver -> of_register_driver -> driver_register -> bus_add_driver -> driver_attach
-> bus_for_each_dev -> __driver_attach -> driver_probe_device -> really_probe -> drv->probe(dev); ......

C/C++Êý×éÃûÓëÖ¸ÕëÇø±ðÉîÈë̽Ë÷

ÒýÑÔ
¡¡¡¡Ö¸ÕëÊÇC/C++ÓïÑÔµÄÌØÉ«£¬¶øÊý×éÃûÓëÖ¸ÕëÓÐÌ«¶àµÄÏàËÆ£¬ÉõÖÁºÜ¶àʱºò£¬Êý×éÃû¿ÉÒÔ×÷ΪָÕëʹÓá£ÓÚÊǺõ£¬ºÜ¶à³ÌÐòÉè¼ÆÕ߾ͱ»¸ãºýÍ¿ÁË¡£¶øÐí¶àµÄ´óѧÀÏʦ£¬ËûÃÇÔÚCÓïÑԵĽÌѧ¹ý³ÌÖÐÒ²´íÎóµÃ¸øѧÉú½²½â£º"Êý×éÃû¾ÍÊÇÖ¸Õë"¡£ºÜÐÒÔË£¬ÎҵĴóѧÀÏʦ¾ÍÊÇÆäÖÐÖ®Ò»¡£Ê±ÖÁ½ñÈÕ£¬ÎÒÈÕ¸´Ò»ÈյؽøÐÐ×ÅC/C++ÏîÄ¿µÄ¿ª·¢£¬¶øÉí±ß» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ