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)
{
......
ͦ·±Ëö£¬Ö®Ç°·¢µÄÌû×Ó£¬·Öֵ̫µÍÏÖÔÚÖØ·¢Ò»¸ö¡£»¶Ó¸÷λ´óÏÀ~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......
ÊäÈë10ѧÉúµÄ³É¼¨£¬¹²4¿Æ£¬°´ÕÕÒªÇó±àдʵÏÖÏÂÁй¦ÄܵijÌÐò£¨ÓÃ×Óº¯ÊýʵÏÖ£©
1 Çó³öÿ¿ÆµÄƽ¾ù³É¼¨ ½«Æ½¾ù·Ö¡µ90µÄͬѧµÄÅÅÐò
×÷ÒµÌù~£¡
àÅ ÎÒͬѧ¸øÎÒ·¢µÄ×÷Òµ ÎÒ×òÌì×öÁË µ«Êǽá¹ûÔËÐв»¶Ô ×òÌìÓкö ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆÌ¨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£ ......