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

CС³ÌÐò£¨Ôöɾ¸Ä²éÈ«ÃæÁ·Ï°£©

1.ÅÅÐòС³ÌÐò£ºÁ·Ï°ÅÅÐò»ù±¾Ëã·¨ºÍº¯ÊýµÄÓ¦Ó㬲¢Ìåζº¯ÊýÓ÷¨µÄºÃ´¦¡£
 #include "stdio.h"
#include "stdlib.h"
#include "string.h"
#define DATA 10
int ArrGrounp[ DATA ];
int ArrGrounp1[DATA];
#define DEFINE1 "ÇëÊäÈë10¸öÊý£º\n"
#define DEFINE2 "Âú×ãÌõ¼þµÄÊýÓУº"
#define DEFINE3 "\nÂú×ãÌõ¼þµÄÊý´Ó´óµ½Ð¡ÅÅÁÐΪ£º"
void InPut(); //ÊäÈ뺯Êý
void trans(); //ɸѡÂú×ãÌõ¼þµÄÊý×Ö
void printfData(); //ÏÔʾº¯Êý
void sort(); //½«Âú×ãÌõ¼þµÄÊý×é½øÐÐÅÅÐò
void main()
{
InPut();
trans();
printfData();
sort();
}
void InPut()
{
printf(DEFINE1);
for(int i=0;i< DATA ;i++)
{
scanf("%d",ArrGrounp[i]);
}
}
void trans()
{
int a,b,c,d,e,f;
int k=0;
for(int i=0;i< DATA ;i++)
{
a=ArrGrounp[i]/1000;
b=(ArrGrounp[i]-a*1000)/100;
c=(ArrGrounp[i]-a*1000-b*100)/10;
d=ArrGrounp[i]-a*1000-b*100-c*10;
e=b*10+d;
f=e%4;
if(f==0)
{
ArrGrounp1[k]=ArrGrounp[i];
k++;
}
}
}
void printfData()
{

printf(DEFINE2);
for(int i=0;i< DATA ;i++)
{
if(ArrGrounp1[i]==0)
break;
printf("%d\t",ArrGrounp1[i]);
}
}
void sort()
{
int temp;
for(int i=DATA-1;i>0 ;i--)
{
if(ArrGrounp1[i]==0)
continue;
for(int j=0;j<i;j++)
{
if(ArrGrounp1[j]<ArrGrounp1[j+1])
{
temp=ArrGrounp1[j];
ArrGrounp1[j]=ArrGrounp1[j+1];
ArrGrounp1[j+1]=temp;
}
}

}
printf(DEFINE3);
for(int i=0;i<DATA;i++)
{
printf("%d\t",ArrGrounp1[i]);
}
}
2.¼òµ¥µÄ²úÆ·¹ÜÀíϵͳ£¬Á·Ï°×Ö·û´®ºê¶¨ÒåºÍ½á¹¹ÌåµÄÓ¦Óá£
#include"stdio.h"
#include"stdlib.h"
#include"string.h"
#define DEFINE1 "\nÇëÊäÈë²úÆ·Ãû³Æ£º"
#define DEFINE2 "\nÇëÊäÈë¿Í»§Ãû³Æ£º"
#define DEFINE3 "\nÇëÊäÈ붩¹ºÊýÁ¿£º"
#define DEFINE4 "\nÇëÊäÈë²úÆ·¼Û¸ñ£º"
#define DEFINE5 "\n»¹Òª¼ÌÐøÊäÈëÂð£¿<1:¼ÌÐø 2.½áÊø>£º"
#define DEFINE6 "\n²éѯ½á¹ûÈçÏ£º\n"
#define DEFINE7 "\nÇëÊäÈë²éѯ¿Í»§Ãû³Æ£º"
#define DEFINE8 "\n¿Í»§Ãû³Æ\t\t²úÆ·Ãû³Æ\t\tÊýÁ¿\t¼Û¸ñ£º\n"
#define DEFINE "\nÇëÑ¡ÔñÄúÒªÖ´ÐеIJÙ×÷£


Ïà¹ØÎĵµ£º

ÓÃCдµÄ3DÃÔ¹¬

          Boss˵£¬Òª¿´OpenGL£¬¿´ÁË¿ìÒ»¸öÔ£¬×ÜËã³öÁ˸öÏñÑùµÄ¶«Î÷£¬ÓÃCдÁ˸ö3DÃÔ¹¬£¬
ËäȻֻÓÐ350ÐÐ
       ´úÂ룬²»¹ý±ßѧ±ßд£¬×ã×ãдÁËÒ»ÖÜʱ¼ä£¬»¹ÊÇСÓгɾ͸еģ¬»î»î»î£¡
         &n ......

ÏÔʾµ¥ÔµÄÈÕÀúµÄC³ÌÐò

ÌâÄ¿ÈçÏ£º
ÒªÇóÏÔʾ³öµ¥ÔµÄÈÕÀú£¬Óû§ËµÃ÷Õâ¸öÔµÄÌìÊýºÍ±¾ÔµÄÆðʼÈÕÊÇÐÇÆÚ¼¸£¬¼´¿ÉÊä³ö¸ÃÔµÄÈÕÀú¡£
¾ÍÊÇÕâôһµÀ¼òµ¥µÄ³ÌÐò£¬ÎÒ±ïÁËÁ½Ìì×ÜËãŪ³öÀ´ÁË£¬½á¹ûËäÈ»´ïµ½ÁËÒªÇ󣬵«¾àÀëÎÒÔ¤ÏëµÄ»¹ÓÐÒ»¶Î²î¾à£¬ÏȰѳÌÐò
´úÂë·ÅÔÚÉÏÃ棬ϣÍû´ó¼Ò¶àÌáÐÞ¸ÄÒâ¼û¡£
/******************************************************* ......

¡¾C/C++¡¿C++ÐéÎö¹¹º¯ÊýµÄ×÷ÓÃ

1¡¢×÷ÓÃ
ΪÁËÔÚʵÏÖ¶à̬µÄʱºò²»Ôì³ÉÄÚ´æй¶,
Èç¹û»ùÀàÎö¹¹º¯ÊýÇ°²»¼Óvitual£¬ÅÉÉúÀà¶ÔÏó±»Ïú»Ùºó£¬Ö»»áµ÷ÓûùÀàµÄÎö¹¹º¯Êý£¬¶ø²»»áÈ¥µ÷ÓÃÅÉÉúÀàµÄÎö¹¹º¯Êý¡£
2¡¢¶ÔÓÚÕý³£µÄº¯Êý£¬Èç¹û»ùÀàÖÐÉùÃ÷Ϊvirtual£¬ÔòÅÉÉúÀà¿ÉÒÔ²»ÓÃÔÙдvirtual
// CPPTest.cpp : Defines the entry point for the console application.
// ......

C/C++ÓïÑÔvoid¼°voidÖ¸ÕëÉî²ã̽Ë÷

C/C++ÓïÑÔvoid¼°voidÖ¸ÕëÉî²ã̽Ë÷
1.¸ÅÊö
Ðí¶à³õѧÕ߶ÔC/C++ÓïÑÔÖеÄvoid¼°voidÖ¸ÕëÀàÐͲ»ÉõÀí½â£¬Òò´ËÔÚʹÓÃÉϳöÏÖÁËһЩ´íÎó¡£±¾ÎĽ«¶Ôvoid¹Ø¼ü×ÖµÄÉî¿Ìº¬Òå½øÐнâ˵£¬²¢ÏêÊövoid¼°voidÖ¸ÕëÀàÐ͵ÄʹÓ÷½·¨Óë¼¼ÇÉ¡£
2.voidµÄº¬Òå
voidµÄ×ÖÃæÒâ˼ÊÇ“ÎÞÀàÐÍ”£¬void *ÔòΪ“ÎÞÀàÐÍÖ¸Õ딣¬void ......

C++ÖÐextern ¡°C¡±º¬ÒåÉî²ã̽Ë÷

1.ÒýÑÔ
¡¡¡¡C++ÓïÑԵĴ´½¨³õÖÔÊÇ“a better C”£¬µ«ÊÇÕâ²¢²»Òâζ×ÅC++ÖÐÀàËÆCÓïÑÔµÄÈ«¾Ö±äÁ¿ºÍº¯ÊýËù²ÉÓõıàÒëºÍÁ¬½Ó·½Ê½ÓëCÓïÑÔÍêÈ«Ïàͬ¡£×÷ΪһÖÖÓûÓëC¼æÈݵÄÓïÑÔ£¬C++±£ÁôÁËÒ»²¿·Ö¹ý³ÌʽÓïÑÔµÄÌص㣨±»ÊÀÈ˳ÆΪ“²»³¹µ×µØÃæÏò¶ÔÏ󔣩£¬Òò¶øËü¿ÉÒÔ¶¨Òå²»ÊôÓÚÈκÎÀàµÄÈ«¾Ö±äÁ¿ºÍº¯Êý¡£µ«ÊÇ£¬C++±Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ