// ConsoleApplication1.cpp : ´ËÎļþ°üº¬ "main" º¯Êý¡£³ÌÐòÖ´Ðн«ÔÚ´Ë´¦¿ªÊ¼²¢½áÊø¡£
|
//
|
|
#include <iostream>
|
#include <stdio.h>
|
#include <stdlib.h>
|
const char str1[] =
|
"1+--------------------------------------------------------------------------+\r\n" \
|
"2| 1 2 BIKE Develope V1.00 5 6 7 |\r\n" \
|
"3|34567890123456789012345678901234567890123456789012345678901234567890123456|\r\n" \
|
"4+-------------------+------------------+-----------------------------------+\r\n" \
|
"5| µç³Ø: --.--V ¸ßѹ: --.--V ²î: --.--V | LED -------- AD²É¼¯ |\r\n" \
|
"6+-------------------+------------------+ ͨµÀ Öµ µçѹ ͨµÀ Öµ µçѹ |\r\n" \
|
"7| ת°Ñ _--- -.--V »ô¶ú - - - | 0 _--- -.--V 4 _--- -.--V |\r\n" \
|
"8| µÍ _--- ¸ß _--- | 1 _--- -.--V 5 _--- -.--V |\r\n" \
|
"9| PWM --- --.-% Çý¶¯ - - - | 2 _--- -.--V 6 _--- -.--V |\r\n" \
|
"0| ´íÎó - - - - - - | 3 _--- -.--V 7 _--- -.--V |\r\n" \
|
"1+--------------------------------------+-----------------------------------|\r\n" \
|
"2| µç»ú¼«¶ÔÊý: --- ³µÂÖÖܳ¤£º--- CM | µç»úµçÁ÷ --.-- A |\r\n" \
|
"3| תËÙ: ---- p/s ---- r/m --.-- Km/H | FPLL -------- |\r\n" \
|
"4+--------------------------------------+-----------------------------------+\r\n";
|
|
|
|
int aa[] = { 1,2,3,10,100,25,33,67,99,12,9,88,10,29,-1,-10,5000,666,888,999,6666 };
|
|
|
void sort(int pdata[], int len)
|
{
|
for (int i = 0; i < len-1; i++) {
|
for (int j = i + 1; j < len; j++) {
|
if (pdata[i] > pdata[j]) {
|
int c = pdata[i];
|
pdata[i] = pdata[j];
|
pdata[j] = c; }
|
}
|
}
|
return;
|
}
|
|
void display(int pdata[], int len)
|
{
|
|
for (int i = 0; i < len; i++)
|
{
|
printf(" %d ", pdata[i]);
|
}
|
printf("\r\n");
|
return;
|
}
|
|
void fun1()
|
{
|
|
// printf("\033[10;10H\033[33;44m abcdefg\033[0m");
|
for (int i = 0; i < 10000; i++)
|
{
|
|
printf("\033[%d;1H\033[2K %d \033[33;44m\r\n", (i / 1000) + 1, i);
|
printf("%s", str1);
|
}
|
}
|
int main()
|
{
|
std::cout << " Hello World! \n "<< sizeof(aa) << " " << sizeof(int) << " " << _countof(aa) << " \n";
|
|
display(aa, _countof(aa));
|
|
sort(aa, _countof(aa));
|
|
display(aa, _countof(aa));
|
|
;
|
|
}
|
|
// ÔËÐгÌÐò: Ctrl + F5 »òµ÷ÊÔ >¡°¿ªÊ¼Ö´ÐÐ(²»µ÷ÊÔ)¡±²Ëµ¥
|
// µ÷ÊÔ³ÌÐò: F5 »òµ÷ÊÔ >¡°¿ªÊ¼µ÷ÊÔ¡±²Ëµ¥
|
|
// ÈëÃÅʹÓü¼ÇÉ:
|
// 1. ʹÓýâ¾ö·½°¸×ÊÔ´¹ÜÀíÆ÷´°¿ÚÌí¼Ó/¹ÜÀíÎļþ
|
// 2. ʹÓÃÍŶÓ×ÊÔ´¹ÜÀíÆ÷´°¿ÚÁ¬½Óµ½Ô´´úÂë¹ÜÀí
|
// 3. ʹÓÃÊä³ö´°¿Ú²é¿´Éú³ÉÊä³öºÍÆäËûÏûÏ¢
|
// 4. ʹÓôíÎóÁÐ±í´°¿Ú²é¿´´íÎó
|
// 5. תµ½¡°ÏîÄ¿¡±>¡°Ìí¼ÓÐÂÏÒÔ´´½¨ÐµĴúÂëÎļþ£¬»òתµ½¡°ÏîÄ¿¡±>¡°Ìí¼ÓÏÖÓÐÏÒÔ½«ÏÖÓдúÂëÎļþÌí¼Óµ½ÏîÄ¿
|
// 6. ½«À´£¬ÈôÒªÔٴδò¿ª´ËÏîÄ¿£¬Çëתµ½¡°Îļþ¡±>¡°´ò¿ª¡±>¡°ÏîÄ¿¡±²¢Ñ¡Ôñ .sln Îļþ
|