?#includeusing namespace std;int main(){ for(int i=1;i<=10;i++) { for(int j=1;j<=i;j++) { cout<<i<<" "; } ...
分类:
其他好文 时间:
2014-08-06 21:57:12
阅读次数:
173
在Linux中有时你需要将脚本(test.sh)和可执行程序(exe)后台执行,请使用如下方式:
nohup ./test.sh &
nohup ./exe &
这样执行的程序可以彻底在后台运行,为什么呢?因为如果你的脚本或者可执行程序中有echo,cout这种向标准输出设备输送内容的指令,普通的后台运行:
./test.sh &
./exe &
是无法满足要求的,当指令往标准...
分类:
系统相关 时间:
2014-08-06 19:23:15
阅读次数:
277
?#includeusing namespace std;int main(){ int a=50; int n; while(1)//关键,造成一个死循环 { cout>n; if(a==n)//循环退出条件 { coutn) { cout<<"...
分类:
其他好文 时间:
2014-08-06 18:45:31
阅读次数:
258
#includeusing namespace std;int main(){ int m,n,i,j=1,k=0,a[20],x,y; cout>m;//输入的数为m y=m;//先将m赋值给y,将原始输入的数保护起来 for(i=1;;i++)//中间的判断条件可以不要,就变成了死循环 ...
分类:
其他好文 时间:
2014-08-06 18:31:11
阅读次数:
696
*************************#includeusing namespace std;int main(){ for(int i=1;i=0;m--) { for(int n=1;n<=m;n++) { cout<<"*"; } cout<<...
分类:
其他好文 时间:
2014-08-06 14:13:01
阅读次数:
217
本系列文章会不断更新,但是时间不能保证。另外基本上都是自己做的答案,仅供参考,如果有疑问欢迎交流。
#include
#include
using namespace std;
int test_Ex_6_27(std::initializer_list li);
int main()
{
cout
return 0;
}
int test_Ex_6_27...
分类:
编程语言 时间:
2014-08-05 22:32:10
阅读次数:
232
今天学的hash。说实话还没怎么搞懂,明天有时间把知识点总结写了,今天就小小的写个结题报告吧!题意: 在n (n.(2)创建vector对象,vector vec;(3)尾部插入数字:vec.push_back(a);(4)使用下标访问元素,cout::iterator it;for(it=vec....
分类:
其他好文 时间:
2014-08-05 22:26:30
阅读次数:
297
#includeusing namespace std;int YuanZhou(int);int main(){ int n; double temp,sum=0; cout>n; for(int i=1;i<=n;i++) { if(i%2==0) { temp=...
分类:
其他好文 时间:
2014-08-05 22:22:50
阅读次数:
209
#includeusing namespace std;int main(){ int a[101]; for(int i=1;i<=100;i++) { a[i]=i; } for(int j=1;j<=100;j++) { cout<<a[j]<<" "; if(j...
分类:
其他好文 时间:
2014-08-05 22:21:10
阅读次数:
256
#include using namespace std; int main(){ int ary[5]{1,2,3,4,5}; for (int& e: ary) e *= 2; for (int e: ary) cout<<e<<'\t'...
分类:
编程语言 时间:
2014-08-05 13:54:09
阅读次数:
209