1. 程式人生 > >自動傳輸軟件(學習之余,給自己弄得一個學習小結)

自動傳輸軟件(學習之余,給自己弄得一個學習小結)

完成 ima 頁面 code 使用 不能 else str2 查詢系統

學習了一段時間後,總覺得有些地方不能融會貫通,因此給自己定了一個小的學習總結目標,自動傳輸軟件

項目要求:需要擁有首頁、傳輸界面、接收界面及尾頁,實現自動跳轉功能

  1 #include<stdio.h>
  2 #include<stdlib.h>
  3  
  4 int main()
  5 {
  6     system("title win10 電腦文件快速自動傳輸工具");//使用system 調用DOS 命令  title為標題命令
  7     system("color 70");
  8     printf(" ======================================================================================================================\n
"); 9 printf(" \n"); 10 printf(" \n"); 11 printf("
\n"); 12 printf(" \n"); 13 printf(" \n
"); 14 printf(" \n"); 15 printf(" \n"); 16 printf(" \n"); 17 printf(" \n"); 18 printf(" \n"); 19 printf(" +++++++++++++++++++++++++++++++++++++++++++++++++++ \n"); 20 printf(" ++ 歡迎使用win10文件快速自動傳輸 ++ \n"); 21 printf(" ++ 作者:伍悅匿匿 ++ \n"); 22 printf(" ++ http://www.qzyezi.cn ++ \n"); 23 printf(" +++++++++++++++++++++++++++++++++++++++++++++++++++ \n"); 24 printf(" \n"); 25 printf(" \n"); 26 printf(" \n"); 27 printf(" \n"); 28 printf(" \n"); 29 printf(" \n"); 30 printf(" \n"); 31 printf(" \n"); 32 printf(" \n"); 33 printf(" \n"); 34 printf(" \n"); 35 printf(" ======================================================================================================================\n"); 36 char mima[100] = "19920523";//設置一個數組來儲存密碼,該數組為100個元素, 37 char input[100] = { 0 };//設置一個數組並初始化該數值所有元素(100個)初始化值為0 38 system("pause"); 39 system("CLS"); 40 printf(" ======================================================================================================================\n"); 41 int n = 1; 42 int a, b; 43 while (1) 44 { 45 printf(" 請輸入密碼:"); 46 gets(input);//gets從標準輸入設備(鍵盤)讀字符串函數,其可以無限讀取,不會判斷上限,以回車結束讀取 47 if (strcmp(mima, input) == 0) 48 /* 49 C / C++函數,比較兩個字符串設這兩個字符串為str1,str2, 50 若str1 == str2,則返回零;若str1<str2,則返回負數;若str1>str2,則返回正數。 51 matlab中函數,strcmp(s1,s2) 判斷兩個字符串s1和s2是否相同,相同返回true, 不同返回false 52 */ 53 { 54 printf(" 密碼輸入正確!\n"); 55 goto ZQ;//跳轉至69行 56 57 } 58 if (n<3) 59 { 60 n++; 61 printf(" 對不起,密碼輸入錯誤!\n"); 62 63 printf(" ======================================================================================================================\n"); 64 } 65 else 66 { 67 printf(" 對不起已經輸入3次錯誤,程序鎖死"); 68 goto TZ;//跳轉至177行 69 } 70 } 71 72 ZQ:for (a = 0; a <= 6; a++) 73 { 74 for (b = a; b < 6; b++) 75 { 76 printf(" 正在準備啟動文件傳輸及急速傳輸渠道,請等待……\n"); 77 } 78 } 79 printf(" 文件傳輸及急速傳輸渠道啟動成功……\n 頁面跳轉準備成功\n"); 80 printf(" ======================================================================================================================\n"); 81 system("pause");//使用system調取DOS 命令 pause為請點擊任意鍵繼續的命令 82 goto GO; 83 GO:system("CLS");//使用system調取DOS 命令 CLS為清屏的命令 84 printf(" ======================================================================================================================\n"); 85 printf(" 跳轉傳輸頁面成功\ n對接文件傳輸接口……\n 對接成功\n 準備傳輸……\n"); 86 printf(" ======================================================================================================================\n"); 87 system("pause"); 88 int i, j, result;//定義i j 和結果result; 89 for (i = 9000; i >= 1; i++)//外層循環從i開始,從9開始,每次遞減 90 //逆向反思,如要正序排列則:(i=1;1<=9;i++) 91 { 92 93 for (j = 1000; j <= i; j++)//內層循環從j開始,從1開始,每次遞增 94 { 95 result = i * j; 96 printf(" %d%d%d", i, j, result);//定義輸出格式及內容\t促使算式之間存在間距 97 if (j == 5500) 98 { 99 goto LOOP;//跳轉至102行 100 } 101 } 102 printf("\n");//換行執行 103 } 104 LOOP:system("CLS"); 105 printf(" ======================================================================================================================\n"); 106 printf(" 自動優化界面啟動成功……\n"); 107 printf(" 文件接收進度查詢系統啟動成功……\n"); 108 printf(" 進度查詢系統跳轉…… \n"); 109 printf(" ======================================================================================================================\n"); 110 system("pause"); 111 int f = 0; 112 while (f<100) 113 { 114 f++; 115 printf(" 電腦文件數據自動截取轉化傳輸中……………………%d%%\n", f); 116 } 117 printf(" 截取傳輸完成,準備轉換數據……\n"); 118 printf(" ======================================================================================================================\n"); 119 system("pause"); 120 printf(" ======================================================================================================================\n"); 121 printf(" 資料自動轉換中……\n"); 122 int e = 0; 123 while (e<100) 124 { 125 e++; 126 printf(" 電腦文件數據自動轉換中……………………%d%%\n", e); 127 } 128 printf(" 轉換完成,跳轉IP連接界面……\n"); 129 printf(" ======================================================================================================================\n"); 130 system("pause"); 131 system("CLS"); 132 printf(" ======================================================================================================================\n"); 133 printf(" IP連接端口開啟中……\n IP連接端口開啟成功……\n 自動輸入IP:238.168.177.253\n"); 134 int h = 0; 135 while (h<5) 136 { 137 h++; 138 printf(" IP連接中……………………%d%%\n", h); 139 } 140 printf(" IP連接成功,資料準備傳輸……\n"); 141 printf(" ======================================================================================================================\n"); 142 system("pause"); 143 int w = 0; 144 while (w<100) 145 { 146 w++; 147 printf(" 資料傳輸中……………………%d%%\n", w); 148 } 149 printf(" 資料傳輸完成……\n"); 150 system("CLS"); 151 printf(" ======================================================================================================================\n"); 152 printf(" \n"); 153 printf(" \n"); 154 printf(" \n"); 155 printf(" \n"); 156 printf(" \n"); 157 printf(" \n"); 158 printf(" \n"); 159 printf(" \n"); 160 printf(" \n"); 161 printf(" \n"); 162 printf(" +++++++++++++++++++++++++++++++++++++++++++++++++++ \n"); 163 printf(" ++ sweet成功傳輸資料%d條 ++ \n", j); 164 printf(" ++ 感謝使用文件快速自動傳輸工具 ++ \n"); 165 printf(" ++ 版本號:1.22 ++ \n"); 166 printf(" ++ http://www.qzyezi.cn ++ \n"); 167 printf(" +++++++++++++++++++++++++++++++++++++++++++++++++++ \n"); 168 printf(" \n"); 169 printf(" \n"); 170 printf(" \n"); 171 printf(" \n"); 172 printf(" \n"); 173 printf(" \n"); 174 printf(" \n"); 175 printf(" \n"); 176 printf(" \n"); 177 printf(" \n"); 178 printf(" \n"); 179 printf(" ======================================================================================================================\n"); 180 TZ:system("pause"); 181 return 0;

  

自動傳輸軟件(學習之余,給自己弄得一個學習小結)