Topic: 求救 高手来帮我看看为什么不行 (typo) |
Print this page |
1.求救 高手来帮我看看为什么不行 (typo) | Copy to clipboard |
Posted by: lianyu55 Posted on: 2004-05-23 00:12 我把我编的两个数求和的程序发上来 那个高手帮我看看卫什末不行啊? 谢谢了~~~~~~~~~~ import java.io.*; class Jiafa{ public static void main(String []arg); { try {withExcep ();} catch(IOException e){System.out.println(e);} catch(NumberformatException e){System.out.println(e+"in Jiafa.main(.) ");} } static void withExcept() throws IOException,NumberFormatException{ byte []bs=new byte[10]; int []i=new int[2]; for(int j=0;j<2;j++) { int len=System.in.read(bs)-2; String s=new String(bs,0,len); try{ int i[j] =Integer.parseInt(s); System.out.println(j+":"+i[j]); } catch(NumberformatException e){System.out.println(e+"in withExcept()"); throw e;} } {System.out.println(i[0]+i[1]);} } } |
2.Re:求救 高手来帮我看看为什么 [Re: lianyu55] | Copy to clipboard |
Posted by: nothing Posted on: 2004-05-23 00:44 编辑一下贴子,有图标,无法看 |
3.Re:求救 高手来帮我看看为什么 [Re: lianyu55] | Copy to clipboard |
Posted by: lianyu55 Posted on: 2004-05-23 14:56 import java.io.*; class Jiafa{ public static void main(String []arg); { try {withExcep ();} catch(IOException e){System.out.println;} catch(NumberformatException e){System.out.println(e+"in Jiafa.main(.) ");} } static void withExcept() throws IOException,NumberFormatException{ byte []bs=new byte[10]; int []i=new int[2]; for(int j=0;j<2;j++) { int len=System.in.read(bs)-2; String s=new String(bs,0,len); try{ int i[j] =Integer.parseInt; System.out.println(j+":"+i[j]); } catch(NumberformatException e){System.out.println(e+"in withExcept()"); throw e;} } {System.out.println(i[0]+i[1]);} } } |
4.Re:求救 高手来帮我看看为什么 [Re: lianyu55] | Copy to clipboard |
Posted by: nothing Posted on: 2004-05-23 16:45 lianyu55 wrote: |
5.Re:求救 高手来帮我看看为什么 [Re: lianyu55] | Copy to clipboard |
Posted by: a77777 Posted on: 2004-05-31 17:54 两数求和用得着这么烦吗? |
6.Re:求救 高手来帮我看看为什么 [Re: lianyu55] | Copy to clipboard |
Posted by: Jacky_one Posted on: 2004-08-09 22:51 还是不能运行啊 怎么没人理了 用得着这样做, 写程序就要象这样 考虑得很细撒 |
7.Re:求救 高手来帮我看看为什么 [Re: lianyu55] | Copy to clipboard |
Posted by: href Posted on: 2004-08-10 10:09 晕啊晕,建议拿这段代码去做肉眼差错考题。 找半天发现main最后由个分号,其实四楼已经都指出来了 测试过,可运行,没检查结果对不对。
|
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |