CСÎÊÌâ - C/C++ / CÓïÑÔ
char tongji(str0,b)
{char str0[100];
int b[4];
int i;
for(i=0;str0[i]!=¡¯\0¡¯;i++)
{if(str0[i]>=65&&str0[i]<=90||str0[i]>=97&&str0[i]<=122) b[0]++;
else if(str0[i]>=48&&str0[i]<=57) b[1]++;
else if(str0[i]==32) b[2]++;
else b[3]++;}
}
void main ()
{char str1[100];
int i,a[4];
gets(str1);
tongji(str1,a);
printf("zimu Shuzi Kongge Qita\n");
for(i=0;i<4;i++)
printf("%-8d ",a[i]);printf("\n");
}
Óкܶà´íÎ󣬴ó¼ÒÄܰ￴һÏ£¬Ò»¸öͳ¼Æ×Ö·û´®µÄº¯Êý¡£
if(str0[i]>=65&&str0[i]<=90||str0[i]>=97&&str0[i]<=122)
Äã¾õµÃÕâ¸ö±È½Ï¶ÔÂð£¿
C/C++ code:
#include<stdio.h>
char tongji(char str1[],int b[])
{
char str0[100];
int i;
for(i=0;str0[i]!='\0';i++)
{
if(str0[i]>=65&&str0[i]<=90||str0[i]>=97&&str0[i]<=122)
b[0]++;
else if(str0[i]>=48&&str0[i]<=57) b[1]++;
else if(str0[i]==32) b[2]++;
else b[3]++;
}
return str0;// ÕâÀïÓ¦¸Ã·µ»ØÒ»¸öÊý×éÖ¸Õ룬ÆäËüµÄ´íÎó¸ÄºÃÁË
}
void main ()
{
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
ÓÐÒ»10*10¾ØÕ󣬳ýÈ¥µÚÒ»¸öµã£¨0£¬0£©ºÍ×îºóÒ»µã£¨9£¬9£©£¬»¹Óа˸öµãΪ1£¬ÆäËû¶¼Îª0£¬ÒªÇóÓöþάÊý×é±íʾ¡£°Ë¸öµãÊÇËæ»úÉú³ÉµÄ£¬±àдÏà¹Ø³ÌÐò±íʾ¾ØÕóËùÓпÉÄÜÇé¿ö¡£
ÕæÐÄÇó½Ì¸÷λ¸ßÊÖ£¬°¥£¡±¾ÈËÌ«²ËÁË£¡ºÇºÇ£¡
......
´ó¼ÒºÃ£º
ÎÒÏëʵÏÖ¼ì²âµ½²åÈëSD¿¨ºó×Ô¶¯½«SD¿¨¸ñʽ»¯µÄ¹¦ÄÜ£¬²»ÖªC/C++ÖÐÓÐûÓиñʽ»¯UÅ̵ĺ¯Êý£¿
ÁíÍ⣬ÎÒ²»ÏëʹÓÃSHFormatDrive£¬ÒòΪÕâ¸öº¯Êý»áµ¯³öÊÇ·ñÒª¸ñʽ»¯µÄÌáʾ¿ò£¬ÎÒÐèÒªµÄÊÇϵͳ×Ô¶¯¸ñʽ»¯£¬¶ø²Ù×÷Õß² ......
ËÄܰïÎÒ°ÑÏÂÃæÕâЩ´úÂë¸Ä³ÉVBÐÎʽµÄ£¬¶àлÁË£¬¼±ÓÃ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
ÊäÈë10ѧÉúµÄ³É¼¨£¬¹²4¿Æ£¬°´ÕÕÒªÇó±àдʵÏÖÏÂÁй¦ÄܵijÌÐò£¨ÓÃ×Óº¯ÊýʵÏÖ£©
1 Çó³öÿ¿ÆµÄƽ¾ù³É¼¨ ½«Æ½¾ù·Ö¡µ90µÄͬѧµÄÅÅÐò
×÷ÒµÌù~£¡
àÅ ÎÒͬѧ¸øÎÒ·¢µÄ×÷Òµ ÎÒ×òÌì×öÁË µ«Êǽá¹ûÔËÐв»¶Ô ×òÌìÓкö ......