码迷,mamicode.com
首页 >  
搜索关键字:eof    ( 7139个结果
Linux Shell脚本之自动修改IP
#!/bin/sh #auto Change ip netmask gateway scripts #wugk 2012-12-17 cat << EOF ++++++++自动修改ip和主机名等相关信息+++++++++ ETHCONF=/etc/sysconfig/network-scripts/ifcfg-eth0 HOSTS=/etc/hosts NETWOR...
分类:系统相关   时间:2015-06-28 12:56:12    阅读次数:186
getchar 和EOF
本文章基于:http://www.cnblogs.com/QLinux/articles/2465329.html,稍作了修改。大师级经典的著作,要字斟句酌的去读,去理解。以前在看K&R的The C Programming Language(Second Edition)中第1.5节的字符输入/输出...
分类:其他好文   时间:2015-06-27 15:46:18    阅读次数:125
HDOJ Problem 1001
输入32位的有符号整数,求和SUM(n)的值。 1 #include 2 3 int main(void) 4 { 5 int n,sum,i; 6 7 while(scanf("%d",&n) != EOF) 8 { 9 sum = 0;10 11 ...
分类:其他好文   时间:2015-06-25 17:10:53    阅读次数:135
一个发送电子邮件的bash脚本
第一个命令行参数会被当邮件内容发送出去 #!/bin/bash #@author Liuyang #@date 2015-02-15 Recipients=xxx@xx.com FROM=xxx@xx.com TO=$Recipients CC= TODAY=`date +%Y%m%d` sendmail "$Recipients" << EOF From: Liuyang...
分类:其他好文   时间:2015-06-23 11:59:55    阅读次数:190
C++ 文件操作
#include #include int main(int,char**){ ifstream input("input.txt"); char c; while (!input.eof()){ input >> c; cout << c << end...
分类:编程语言   时间:2015-06-21 14:23:23    阅读次数:141
UVa10082 WERTYU
#include #include int main(){ // 用C++提交AC char s[] = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./"; int c; while ((c = getchar()) != EOF) { char....
分类:其他好文   时间:2015-06-20 13:03:29    阅读次数:105
UVa272 TEX Quotes
#include int main(){ int c, q = 1; while ((c = getchar()) != EOF) { if (c == '"') { printf(q ? "``" : "''"); q ^= 1; } else putchar(c); } return 0;}
分类:其他好文   时间:2015-06-20 13:01:11    阅读次数:110
水题(HDU1001)
#includeint main(){ int n,sum; while(scanf("%d",&n)!=EOF) { if(n%2==0) sum=n/2*(n+1); else sum=(n+1)/2...
分类:其他好文   时间:2015-06-20 11:49:28    阅读次数:96
poj2656---求一列数中最大数的序数而且在前面输入的更优先
#include#includeint main(){ int n,i; while(scanf("%d",&n) != EOF && n) { int max=0,maxdown,day,nigt; for(i=0; i max) ...
分类:其他好文   时间:2015-06-18 11:25:48    阅读次数:98
poj2583---Series Determination
#include #include int main(){ int x,y,z,a,b,c; while(scanf("%d %d %d",&x,&y,&z) !=EOF) { a=(z+x-2*y)/2; b=(4*y-3*x-z)/2; ...
分类:其他好文   时间:2015-06-16 20:49:23    阅读次数:100
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!