- 博客(4)
- 收藏
- 关注
原创 随机测试数据
#include #include #include #define N 100#define random(m) (rand()%m) int main () { freopen("1.txt","w",stdout); srand((int)time(0)); int n=10; printf("
2011-06-30 18:07:00 278
原创 gcd
int gcd(int a,int b){ int r; while(a%b) { r=a%b; a=b; b=r; }} int gcd(int a,int b){ if (a<b) return gcd(b,a); else if (a%b==0) re
2011-06-29 16:12:00 247
转载 文件输出 换行
java中写.txt文件,实现换行的几种方法: 1.使用java中的转义符"/r/n": String str="aaa"; str+="/r/n"; 这样在str后面就有换行了. 注意:/r,/n的顺序是不能够对换的,否则不能实现换行的效果. 2.BufferedWriter的newline()方法: FileOutputStr
2011-06-12 18:08:00 573
原创 unhandled exception filenotfoundexception 文件输出
如果不写try catch就会出现unhandled exception filenotfoundexception这个错误import java.io.FileOutputStream;public class test{ public static void main(String args[ ]) { String s="123456";
2011-06-12 17:15:00 3729
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人