2018年6月12日

c++重新学习1全局数组与数组初始化

摘要: 1 //this file is used to test ShuZe 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int a[100]; 8 int main() 9 { 10 for(int i=0;i<=99;i++) 11 { 12 cout<<... 阅读全文

posted @ 2018-06-12 11:43 tjtzgby 阅读(197) 评论(0) 推荐(0) 编辑

2016年5月27日

java-Qduoj-“GZS的三角形”的不完全解

摘要: 本解范围过小,未使用字符串操作,数据会溢出。 阅读全文

posted @ 2016-05-27 23:09 tjtzgby 阅读(388) 评论(0) 推荐(0) 编辑

2016年5月21日

java-关于文件操作-输出流的使用

摘要: 11.3.1.3 读取文件 虽然前面介绍了流的概念,但是这个概念对于初学者来说,还是比较抽象的,下面以实际的读取文件为例子,介绍流的概念,以及输入流的基本使用。 按照前面介绍的知识,将文件中的数据读入程序,是将程序外部的数据传入程序中,应该使用输入流——InputStream或Reader。而由于读 阅读全文

posted @ 2016-05-21 14:00 tjtzgby 阅读(7740) 评论(0) 推荐(0) 编辑

JAVA-输出乘法表并对齐

摘要: 结果如下: 阅读全文

posted @ 2016-05-21 12:47 tjtzgby 阅读(718) 评论(0) 推荐(0) 编辑

2016年5月15日

java-两数最大公约数

摘要: import java.util.Scanner; public class lc2 { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=sc.nextInt(); ... 阅读全文

posted @ 2016-05-15 00:16 tjtzgby 阅读(113) 评论(0) 推荐(0) 编辑

java-百鸡问题

摘要: public class baiji2 { public static void main(String args[]) { System.out.println("以下是各种情况:"); for(int i=0;i<=25;++i)//Gongji { for(int j=0;j<=33;++j)//muj... 阅读全文

posted @ 2016-05-15 00:15 tjtzgby 阅读(506) 评论(0) 推荐(0) 编辑

java-喝饮料换空瓶问题

摘要: //1 public class yinliao1 { public static void main(String args[]) { int a=1000; int kong=1000; int he=1000; System.out.println("第1次:"+" He="+he+" KONG="+kong); ... 阅读全文

posted @ 2016-05-15 00:12 tjtzgby 阅读(506) 评论(0) 推荐(0) 编辑

java-水仙花数

摘要: //自动找三位数水仙花数import java.util.Scanner; import java.lang.Math; public class zhaoshuixianhua { public static void main(String args[]) { for(int s=100;s<=999;++s) { int ge... 阅读全文

posted @ 2016-05-15 00:10 tjtzgby 阅读(533) 评论(0) 推荐(0) 编辑

2015年11月1日

统计n个数中的1的个数

摘要: #include#include#includeusing namespace std;int main(){ freopen("rand.txt","r",stdin); freopen("xuduoshudeyi.out","w",stdout); int n,count=0,... 阅读全文

posted @ 2015-11-01 13:08 tjtzgby 阅读(189) 评论(1) 推荐(0) 编辑

随机数生成器,完成后打开文件。

摘要: #include#include#include#includeusing namespace std;int main(){ freopen("rand.txt","w",stdout); long long a,b,n,cou;//cou:数据个数; cin>>a>>b>>c... 阅读全文

posted @ 2015-11-01 13:05 tjtzgby 阅读(168) 评论(0) 推荐(0) 编辑

导航