| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:我是指在pku服务器上。In Reply To:system("ls -l > ls.txt") 这样?? Posted by:Sempr at 2008-10-25 14:58:05 比如1000题
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[99]="expr 5 + 6";
int a,b;
scanf("%d%d",&a,&b);
if(a==10||b==10)printf("%d\n",a+b);
else
{
s[5]=a+'0';
s[9]=b+'0';
system(s); <-怎么把这句的结果重定向到输出文件里。
}
return 0;
}
在本地shell里测试看上去结果是对的。交上去是wa。
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator