c语言如何打印出连续的竖直线? c语言中表示“或”的两条竖线怎么打出来啊
c\u8bed\u8a00\u5982\u4f55\u6253\u5370\u51fa\u8fde\u7eed\u7684\u7ad6\u76f4\u7ebf\uff1f
#include
#include
int main()
{
for(int i=0;i<4;i++)
puts("\u4e28");
system("pause");
return 0;
}
\u8f93\u51fa\u51fa\u6765\u7684\u5c31\u662f\u8fde\u7eed\u7ad6\u7ebf
\u539f\u7406\uff1a\u4f7f\u7528\u4e00\u79cd\u80fd\u5360\u636e\u5168\u90e8\u7ad6\u5411\u4f4d\u7f6e\u7684\u7b26\u53f7\u5373\u53ef
\u5728C\u8bed\u8a00\u4e2d\uff0c\u6216\u6709\u4e24\u79cd\u3002
1 \u903b\u8f91\u8fd0\u7b97\u4e2d\u7684\u6216\u8fd0\u7b97\u3002\u9898\u76ee\u4e2d\u63d0\u5230\u7684\u5c31\u662f\u8fd9\u4e00\u8fd0\u7b97\u3002
\u6807\u8bc6\u7b26\u4e3a||\uff0c \u5b83\u5e76\u4e0d\u662f\u4e00\u4e2a\u7b26\u53f7\uff0c\u800c\u662f\u7531\u4e24\u4e2a|\u7ec4\u6210\u7684\u3002
\u53ef\u4ee5\u5728\u952e\u76d8\u53f3\u4fa7\uff0c\u5b57\u6bcd\u7684\u7b2c\u4e00\u884c(QWERT\u884c)\u6700\u53f3\u4fa7\uff0c\u4f1a\u6709\u4e00\u4e2a\u6807\u6ce8\u4e3a|\u548c\\u4e24\u4e2a\u5b57\u7b26\u7684\u952e\u3002 \u540c\u65f6\u6309shift\u548c\u8be5\u952e\uff0c\u5373\u53ef\u6253\u51fa|\u7b26\u53f7\u3002\u8fde\u7eed\u6253\u4e24\u6b21\u5c31\u662f||\u3002
\u5176\u529f\u80fd\u4e3a\u903b\u8f91\u6216\uff0c\u662f\u4e00\u4e2a\u4e8c\u76ee\u8fd0\u7b97\u7b26\uff0c\u53ea\u6709\u5f53\u4e24\u8fb9\u7684\u8868\u8fbe\u5f0f\u5747\u4e3a\u5047\u65f6\uff0c\u7ed3\u679c\u4e3a\u5047\uff0c\u5426\u5219\u7ed3\u679c\u4e3a\u771f\u3002\u5373\uff1a
\u771f||\u771f=\u771f
\u771f||\u5047=\u771f
\u5047||\u771f=\u771f
\u5047||\u5047=\u5047
2 \u53e6\u4e00\u79cd\u6216\u8fd0\u7b97\u4e3a\u4f4d\u8fd0\u7b97\u4e2d\u7684\u6216\u64cd\u4f5c\u3002
\u6807\u8bc6\u7b26\u4e3a|\uff0c \u6253\u51fa\u7684\u65b9\u6cd5\u540c\u4e0a\uff0c\u53ea\u4e0d\u8fc7\u4e0d\u662f\u4e24\u6b21\u800c\u662f\u4e00\u6b21
\u6216\u64cd\u4f5c\u7684\u529f\u80fd\u662f\u6309\u4f4d\u6267\u884c\u6216\u8fd0\u7b97\u3002\u6bcf\u4f4d\u7684\u6267\u884c\u539f\u5219\u4e3a
0|0=0
1|0=1
0|1=1
1|1=1
\u5373\u53ea\u6709\u4e24\u8fb9\u7684\u503c\u5747\u4e3a0\u65f6\u7ed3\u679c\u4e3a0\uff0c\u5426\u5219\u4e3a1\u3002
for(i=10,i>=0;i=i-2)printf("%2d|\n |\n",i);
自己在键盘上仔细找啊
绛旓細鐪嬩竴涓嬮敭鐩樺瓧姣嶅尯鍩熶笂闈㈢殑閭f帓鏁板瓧锛0寰鍚庢暟鍒扮涓変釜閿紝鍗抽鏍煎墠闈㈤偅涓敭 鍔犱笂shift鎵撳氨鑳鎵撳嚭锝滐綔 灏辨槸C涓殑鎴 鍦═C涓樉绀虹殑鏄袱涓棿鏂殑灏绔锛屾槸姝e父鐨
绛旓細鍦C璇█涓锛屾垨鏈変袱绉嶃1 閫昏緫杩愮畻涓殑鎴栬繍绠椼傞鐩腑鎻愬埌鐨勫氨鏄繖涓杩愮畻銆傛爣璇嗙涓簗|锛 瀹冨苟涓嶆槸涓涓鍙凤紝鑰屾槸鐢变袱涓獆缁勬垚鐨勩傚彲浠ュ湪閿洏鍙充晶锛屽瓧姣嶇殑绗竴琛(QWERT琛)鏈鍙充晶锛屼細鏈変竴涓爣娉ㄤ负|鍜孿涓や釜瀛楃鐨勯敭銆 鍚屾椂鎸塻hift鍜岃閿紝鍗冲彲鎵撳嚭|绗﹀彿銆杩炵画鎵涓ゆ灏辨槸||銆傚叾鍔熻兘涓洪昏緫鎴栵紝鏄...
绛旓細鍙岀珫绾夸笉鏄竴涓鍙 鑰屾槸涓や釜|缁勫悎鍒颁竴璧风殑 |鍦ㄥ洖杞﹂敭涓婇潰 鍜孿鍏辩敤 鎵浠 鎸変綇shift 鎸変袱涓嬭繖涓敭锛屽氨鍑烘潵 || 浜
绛旓細j < n - 2; ++j) cout << " ";cout << ch; // 鐭╁舰鐨勫彸杈筩out << " "; // 鐣2涓┖鏍糲out << ch; // 绗竴涓笁瑙掑舰鐨勭珫鐩瑙掕竟for(j = 0; j < i; ++j) cout << " ";cout << ch; // 绗竴涓笁瑙掑舰鐨勬枩杈筬or(j = 0; j < n + 2; ++j) cout << " "...
绛旓細缁撹鏄紝瑕佽緭鍏C璇█涓殑鈥滄垨鑰呪濈鍙封渱|鈥濓紝鍙渶閬靛惊鍑犱釜绠鍗曠殑姝ラ銆備互涓嬫槸鍏蜂綋鐨勯敭鐩樻搷浣滄寚鍗楋細鍦–璇█涓〃绀衡滄垨鑰呪濈殑鈥渱|鈥濈鍙峰彲閫氳繃閿洏涓婄壒娈婄粍鍚鎵撳嚭銆備互涓嬫槸姝ラ锛氶鍏堬紝淇濇寔shift閿殑鎸変笅锛屾壘鍒伴敭鐩樹笂鏍囨湁绾㈣壊鏂规鐨勯敭锛岄氬父杩欎釜閿槸浣嶄簬鍥炶溅閿乏杈癸紝浣嶇疆鍙兘鍥犻敭鐩樺瀷鍙疯屽紓锛屽彲鑳芥槸涓や釜...
绛旓細浣犲ソ锛侊紒锛佺湅鍒板垹闄ら敭鍓嶉潰鐨勪竴涓敭浜嗗惂锛屽彲浠ラ夋嫨鍦ㄨ嫳鏂囪繕鏄腑鏂囩殑鐘舵佷笅锛氬悓鏃舵寜浣弒hift鍜岃繖涓敭灏卞彲浠ヨ緭鍏ヤ簡锛宭z瑕佹槸浣犳槸鍦ㄨ嫳鏂囪繕鏄腑鏂囩殑鐘舵佷笅銆
绛旓細娲涜胺鐨勫厔寮燂紵鍏堝垱閫犱竴涓瓧绗︿覆鎸囬拡锛屾寚鍚戣緭鍏ヨ繘鏉ョ殑瀛楃涓(鎸囧悜瀛楃涓茬殑澶,涔熷氨鏄涓涓瓧绗︾涓涓垚鍛)鐒跺悗鍦ㄨ緭鍑虹殑for寰幆閲屾瘡娆″惊鐜寚閽堝悜涓嬪亸绉讳竴浣嶏紝杈撳嚭鎸囬拡鎸囧悜鐨勫瓧绗﹁緭鍑鸿繖鏄綘瑕佺殑1涓瓧绗︼紝鍚庨潰鍐嶅甫涓崲琛屽氨鏄綘瑕鐨勭珫鐩杈撳嚭
绛旓細include<stdio.h> main(){ char c;while((c=getchar())!='\n' ){ if((c>='a'&&c<='z')鈥(c>='A'&&c<='Z')){c=c+4;if(c>'Z'&&c<='Z'+4鈥朿>'z')c=c-26;} printf("%c",c);getch();} 杩樻槸浣犵殑杩愮畻绗|涓嶅 锛屽氨鍦˙ackspace閿笅闈紝瑕佺敤shift閿夋嫨 ...
绛旓細鍙绔鏉犱笉鏄竴涓瓧绗 鑰屾槸涓や釜|缁勫悎鎴愮殑 || 琛ㄧず閫昏緫鎴 杈撳叆鏂规硶 shift 鍔犱笂\ 涔熷氨鏄洖杞︿笂闈㈤偅涓敭 鎸変袱娆 ||
绛旓細宸ュ叿锛忔潗鏂欙細浠icrosoft Visual Studio 2010涓轰緥銆1銆侀鍏堝湪妗岄潰涓婏紝鐐瑰嚮鈥淢icrosoft Visual Studio 2010鈥濆浘鏍囥2銆佺劧鍚庡湪璇ョ晫闈腑锛屽厜鏍囧畾浣嶅埌瑕佽緭鍏ユ垨鐨勯偅涓や釜绔鐨勭鍙风殑浣嶇疆銆3銆佷箣鍚庡湪閿洏涓婏紝杩炵画鎸変袱涓嬧淪hift鈥濆拰鈥渱鈥濇寜閿4銆佹渶鍚庡湪璇ョ晫闈腑锛屾垚鍔熸樉绀烘垨鐨勯偅涓や釜绔栫殑绗﹀彿銆