原创 2016-2018年第九屆藍橋杯【C++省賽B組】【題目彙總】

** 原創文章鏈接 ** 2016年第七屆藍橋杯【C++省賽B組】【題目彙總】 煤球數目 生日蠟燭 湊算式 快速排序 抽籤 方格填數 剪郵票 四平方定理 交換瓶子 2017年第八屆藍橋杯【C++省賽B組】【題目彙總】 原創鏈接 2

原创 shell 腳本讀取文件內容並輸出--問題總結(編碼問題)

shell腳本讀取文件主要介紹兩種方式: 第一種: #/bin/bash while read line do echo $line done < a.txt 第二種: #/bin/bash cat a.txt | whil

原创 關於shell腳本編程出現的問題

正則表達式 KaTeX parse error: Can't use function '\.' in math mode at position 22: …=~ ^[-[:alnum:]\̲.̲_]+ 查找$REPLY變量裏行首行尾

原创 linuxshell腳本編程

文件表達式 -e filename 如果 filename存在,則爲真 -d filename 如果 filename爲目錄,則爲真 -f filename 如果 filename爲常規文件,則爲真 -L filename 如果 fi

原创 margin:auto 和margin:0 auto的區別

1、意思不同。margin:auto=margin:auto auto auto auto,表示上下左右都爲auto;margin:0 auto=margin:0 auto 0 auto,表示上下爲0,左右爲auto; 2、居中方式不

原创 div居中

由於在實際代碼書寫當中遇到一些問題,網上搜索之後發現這篇文章比較好,於是弄過來給大家看,如果大家想看原文,可以在最下方找到鏈接,該文中一旦出現<圖片>均是圖片格式,大家可以在原文中找到 水平居中的實現方案,大家最熟悉的莫過開給元素定一

原创 相對問題和絕對問題

一:絕對定位 position: absolute;絕對定位:絕對定位是相對於元素最近的已定位的祖先元素(即是設置了絕對定位或者相對定位的祖先元素)。如果元素沒有已定位的祖先元素,那麼它的位置則是相對於最初的包含塊(body)。 絕對

原创 從鍵盤鍵入5個國家的名字,按字典序輸出

#include <stdio.h> #include <string.h> int main() { int i,j; char s[5][20],t[20]; for(i=0;i<5;i++) gets(s[i]);

原创 有三行文字,每行最多80個字符,求其中大寫字母,小寫字母,數字,空格和其他

#include<stdio.h> int main() { char text[3][20];//定義三行,每行最多不超過20個字符的二位數組 char c; int i,j; int upCase

原创 輸入五個字符串,輸出最長的字符串

#include <stdio.h> #include <string.h > int main() { int i = 0; char s[80] = {""}, max[80] = {""}; pr

原创 判斷一個字符串是否是迴文字符串

#include<string.h> #include<stdio.h> main() { char a[40]; //定義一個存放待判斷的字符數組 int i=0,len; printf("please input your

原创 輸入n個字符串,將以A打頭的字符串輸出

#include <iostream> #include <string> using namespace std; int main() { string str[80]; int i, n; cout<<"