C ¶Á100¸öÊýµ½Êý×é
#include <stdio.h>
#define MAX 100
int a[MAX], b[MAX], count = 0;
void rData()
{ int i;
FILE *fp;
fp = fopen("C:\\100.dat", "r");
for (i=0; i<MAX; i++)
fscanf(fp, "%d,", &a[i]);
fclose(fp);
}
void main()
{ int i;
rData();
//printf("Âú×ãÌõ¼þµÄÊý=%d\n", count);
for (i=0; i<MAX; i++)
printf("%d\n ", a[i]);
printf("\n");
}
²Î¿¼£º
ÒÑÖªÊý¾ÝÎļþIN.datÖдæÓÐ200¸öËÄλÊý£¬²¢Òѵ÷ÓöÁº¯ÊýrData()°ÑÕâЩÊý´æÈëÊý×éaÖУ¬Çë±àдº¯ÊýspellNum()£¬Æ书ÄÜÊÇ£º°Ñ¸öλÊý×ÖºÍǧλÊý×ÖÖØÐÂ×é³ÉÒ»¸öеĶþλÊý£¨Ð¶þλÊýµÄʮλÊý×ÖÊÇÔËÄλÊýµÄ¸öλÊý×Ö£¬Ð¶þλÊýµÄ¸öλÊý×ÖÊÇÔËÄλÊýµÄǧλÊý×Ö£©£¬ÒÔ¼°°Ñ°ÙλÊý×ÖºÍʮλÊý×Ö×é³ÉÁíÒ»¸öеĶþλÊý£¨Ð¶þλÊýµÄʮλÊý×ÖÊÇÔËÄλÊýµÄ°ÙλÊý×Ö£¬Ð¶þλÊýµÄ¸öλÊý×ÖÊÇÔËÄλÊýµÄʮλÊý×Ö£©£¬Èç¹ûÐÂ×é³ÉµÄÁ½¸ö¶þλÊýÒ»¸öÊÇÆæÊý£¬ÁíÒ»¸öΪżÊý£¬²¢ÇÒÁ½¸ö¶þλÊýÖÐÖÁÉÙÓÐÒ»¸öÊýÄܱ»17Õû³ý£¬Í¬Ê±Á½¸öÐÂÊýµÄʮλÊý×Ö¾ù²»Îª0£¬Ôò½«Âú×ã´ËÌõ¼þµÄËÄλÊý°´´Ó´óµ½Ð¡µÄ˳Ðò´æÈëÊý×ébÖУ¬²¢Òª¼ÆËãÂú×ãÉÏÊöÌõ¼þµÄËÄλÊýµÄ¸öÊýcount¡£×îºómain()º¯Êýµ÷ÓÃдº¯ÊýwData()£¬°Ñ½á¹ûcountÒÔ¼°Êý×ébÖзûºÏÌõ¼þµÄËÄλÊýÊä³öµ½OUT.datÎļþÖС£
#include <stdio.h>
#define MAX 200
int a[MAX], b[MAX], count = 0;
void spellNum()
{ int i, thou, hun, ten, data, j;
int ab, cd;
for (i=0; i<200; i++)
{ thou = a[i]/1000;
hun = a[i]%1000/100;
ten = a[i]%100/10;
data = a[i]%10;
if (data==0 || hun==0)
continue;
ab = 10*data+thou;
cd = 10*hun+ten;
if ((ab-cd)%2!=0 && (ab*cd)%17==0)
{ b[count] = a[i];
count++;
}
}
for (i=0; i<count-1; i++)
for (j=i+1; j<count; j++)
if (b[i] < b[j])
{ data = b[i];
b[i] = b[j];
b[j] = data;
}
}
void rData()
{ int i;
FILE *fp;
fp = fopen("IN.dat", "r");
for (i=0; i<MAX; i++)
fscanf(fp, "%d,", &a[i]);
fclose(fp);
}
void wData()
{ FILE *fp;
int i;
fp = fopen("OUT.dat", "w");
fprintf(fp, "%d\n", count);
for (i=0; i<count; i++)
fprintf(fp, "%d\n", b[i]);
fclose(fp);
}
void main()
{ int i;
rData();
spellNum();
printf
Ïà¹ØÎĵµ£º
3.ÄÚ¹¦Ìâ
¡¡¡¡ÊÔÌâ1£º·Ö±ð¸ø³öBOOL£¬int£¬float£¬Ö¸Õë±äÁ¿ Óë“ÁãÖµ”±È½ÏµÄ if Óï¾ä£¨¼ÙÉè±äÁ¿ÃûΪvar£©
¡¡¡¡½â´ð£º
¡¡¡¡¡¡BOOLÐͱäÁ¿£ºif(!var)
¡¡¡¡¡¡intÐͱäÁ¿£º if(var==0)
¡¡¡¡¡¡floatÐͱäÁ¿£º
¡¡¡¡¡¡const float EPSINON = 0.00001;
¡¡¡¡¡¡if ((x >= - EPSINON) && (x <= EPSI ......
ÓÃC/C£«£«Ð´CGI³ÌÐò
ʹÓÃCGIC¿âµÄ¼òÒª£º
¿âµÄº¯Êý˵Ã÷£º http://www.boutell.com/cgic/#cgiFormStringNoNewlines
1. ´òÓ¡CGI±ê×¼Êä³öÍ·²¿£º
cgiHeaderContentType£¨"text/plain"£©£»
»òÕߣº
......
www.us-ip.com
ÃÀ¹úרÀû·¨Ìõ¿î102(c),102(d)
35 U.S.C. 102:
A person shall be entitled to a patent unless -
(c) he has abandoned the invention
102(c)Ìõ¿îÖ¸³öÈç¹û·¢Ã÷ÈËÒÅÆúÁË·¢Ã÷£¬ÄÇô·¢Ã÷È˽«²»ÄÜ»ñµÃÃÀ¹úרÀû¡£·¢Ã÷ÈËÒÅÆú·¢Ã÷±ØÐëÊǹÊÒâµÄÐÐΪ£¬²¢ÇÒÒâͼ½«ÒÅÆúµÄ·¢Ã÷·îÏ׸øÉç»á¡£·¢Ã÷È˲»Ò»¶¨ÐèÒª¹«¿ªÐûÊ¾Õ ......
ÓÃÒ»¾ä»°¸ÅÀ¨extern “C”Õâ¸öÉùÃ÷µÄÕæʵĿµÄ¾ÍÊÇʵÏÖC++ÓëC¼°ÆäËüÓïÑԵĻìºÏ±à³Ì¡£
extern "C"µÄ¹ßÓ÷¨
£¨1£©ÔÚC++ÖÐÒýÓÃCÓïÑÔÖеĺ¯ÊýºÍ±äÁ¿£¬ÔÚ°üº¬CÓïÑÔÍ·Îļþ£¨¼ÙÉèΪcExample.h£©Ê±£¬Ðè½øÐÐÏÂÁд¦Àí£º
extern "C"
{
££i nclude "cExample.h"
}
¶øÔÚCÓïÑÔµÄÍ·ÎļþÖУ¬¶ÔÆäÍⲿº¯ÊýÖ»ÄÜÖ¸¶¨ÎªexternÀà ......
Àý£º#define NELE(a) (sizeof(a) / sizeof(a[0]))
int main() {
char str[] = {'E', 'M', 'C'};
for (int d=-1; d<=(NELE(str)-2);d++)
printf("%c",str[d+1]);
return 0;
}
ÅжÏprintf£¨£©Êä³öµÄÊÇʲô£¬½á¹û¿ÉÄܳöºõÒâÁÏ£¬Ê²Ã´Ò²Ã»ÓÐÊä³ö£¬ÔÒòÄØ£¿ÔÒò ......