C Sharp ÈëÃÅ£¨¶þ£©±äÁ¿
ÏÈѧVB£¬ÔÙѧC#¡£Ñ§ºÃÁËC#ѧC++¾Í²»ÔÚ»°ÏÂÁË£¡
»¹ÊÇÏÈÔÚCSÖн¨Á¢Ò»¸ö¿ØÖÆ̨³ÌÐò£¬ÔÙ´ò¿ª“Program.cs”¡£
ÔÚ void_Main ÊäÈëÒÔÏ´úÂ룺
Õâ´Î´úÂë½Ï³¤£¬ÎҾͲ»¸ßÁÁÁË£¡
double pp1;//¶¨Òå±äÁ¿
double pp2;
Console.Title = "Å£Îѳ˷¨¼ÆËãÆ÷";
//Çå¿ÕÆÁÄ»£ºConsole.Clear;
Console.WriteLine("");
Console.Write(" ÑÝʾ³ÌÐò£º");
Console.ForegroundColor = ConsoleColor.White;
Console.Write("³Ë·¨¼ÆËãÆ÷");
Console.WriteLine("");
Console.WriteLine("");
Console.ForegroundColor = ConsoleColor.Gray;
Console.Write(" ÇëÊäÈë±»³ËÊýY£º");
pp1 = Convert.ToDouble(Console.ReadLine());//ת»»²¢Ïò±äÁ¿¸³Öµ
Console.Write(" ÇëÊäÈë±»³ËÊýZ£º");
pp2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("&nbs
Ïà¹ØÎĵµ£º
HÎļþºÍCÎļþÔõôÓÃÄØ£¿Ò»°ãÀ´Ëµ£¬HÎļþÖÐÊÇdeclare£¨ÉùÃ÷£©£¬CÎļþÖÐÊÇdefine£¨¶¨Ò壩¡£ÒòΪCÎļþÒª±àÒë³É¿âÎļþ£¨WindowsÏÂÊÇ.obj/.lib£¬UNIXÏÂÊÇ.o/.a£©£¬Èç¹û±ðÈËҪʹÓÃÄãµÄº¯Êý£¬ÄÇô¾ÍÒªÒýÓÃÄãµÄHÎļþ£¬ËùÒÔ£¬HÎļþÖÐÒ»°ãÊDZäÁ¿¡¢ºê¶¨Ò塢ö¾Ù¡¢½á¹¹ºÍº¯Êý½Ó¿ÚµÄÉùÃ÷£¬¾ÍÏñÒ»¸ö½Ó¿Ú˵Ã÷ÎļþÒ»Ñù¡£¶øCÎļþÔòÊÇʵÏÖϸ½Ú ......
Ò»¡¢ºê¶¨Òå(²»´ø²ÎÊýµÄºê¶¨Òå,´ø²ÎÊýµÄºê¶¨Òå)
1.±àÒëÔ¤´¦Àí¾ÍÊǶÔCÔ´³ÌÐò½øÐбàÒëÇ°,ÓÉ"±àÒëÔ¤´¦Àí³ÌÐò"¶ÔÔ¤´¦ÀíÃüÁîÐнøÐд¦ÀíµÄ¹ý³Ì¡£
2.CÓïÑÔÖÐ,·²ÊÇÒÔ"#"¿ªÍ·µÄÐÐ,¶¼³ÆΪ"±àÒëÔ¤´¦Àí"ÃüÁîÐС£
CÓïÑÔÖеıàÒëÔ¤´¦ÃüÁîÓÐ:#define,#undef,#include,#if,#else,#elif,#endif,#ifdef,#ifndef,#line,#pragma,#error¡£ÕâÐ©Ô ......
ÔÚVisual Studio 2005Öд´½¨C³ÌÐòµÄ·½·¨Îª£º
1. File ->New Project -> Visual C++ -> Win32 -> Win32 Console Application,È»ºóÔÚÏÂÃæµÄNameÀ¸Ð´ÉÏProjectÃû³Æ,LocationÀ¸Ð´ÉÏÎļþµÄ´æ·Å·¾¶,µãOK°´Å¥½øÈëApplication Settings,ÔÚAddtional optionsÖÐÑ ......
CÓïÑÔ±ØÖª±Ø»á
Ö¸Õ룺
1.Ö¸ÕëÉùÃ÷ºóÒª¸³Öµ£¡·ñÔòÊÇ¿ÕÖ¸Õ룬¿É²»ÖªµÀÖ¸ÏòÁËÄÄÀï
ÀýÈ磺
void swap(int *a,int *b){
int *tmp;
*tmp=*a;
*a=*b;
*b=*tmp;
}
±¾À´ÊÇÏëÀûÓÃÉÏÃæµÄswapº¯ÊýʵÏÖÁ½¸öÊýµÄ»¥»»£¬µ«ÊÇ*tep=*a;Õâ¾ä»°ÊÇÓÐÎóµÄ ......