老师好:我昨天做完时已经是11点多了,错过了提交时间,希望用此篇博客弥补一下我的过失。

import java.io.;
import java.lang.;
import java.util.Scanner;
public class MyCP {
public static void main(String args[]) {
try {
FileReader file=new FileReader("/Users/windows/Desktop/mycp.txt");
OutputStreamWriter binary=new OutputStreamWriter(new FileOutputStream("/Users/windows/Desktop/mycp.txt"));
BufferedReader br=new BufferedReader(file);
String strs=null; while ((strs=br.readLine())!=null) { System.out.println(strs);
int num=Integer.parseInt(strs);
//for (int i=0;i<strs.length();i++){ binary.write(Integer.toBinaryString(num));
System.out.print(Integer.toBinaryString(num));
//} }
binary.close();
} catch (FileNotFoundException e) {
System.out.println(" NO file exist");
} catch (IOException e) {
e.printStackTrace();
} System.out.println();
try { FileReader file2=new FileReader("C:\Users\lenovo\zhuanyedajiesanshinian20155307\zhuanyedajiesanshinian20155307");
OutputStreamWriter test=new OutputStreamWriter(new FileOutputStream("C:\\Users\\LJY\\IdeaProjects\\Stream\\src\\test2.txt"));
BufferedReader br2=new BufferedReader(file2);
String strs2=null; while ((strs2=br2.readLine())!=null) { System.out.println(strs2);
//int num2=Integer.parseInt(strs2);
//for (int i=0;i<strs.length();i++){ test.write(Integer.parseInt(strs2,2));
System.out.println(Integer.parseInt(strs2,2));
//} }
test.close();
} catch (FileNotFoundException e) {
System.out.println("file doesn't exist");
} catch (IOException e) {
e.printStackTrace();
} }
}

mycp码云链接

mycp 补交作业的更多相关文章

  1. Mycp补交作业

    Mycp补交作业 代码 import java.io.; import java.lang.; import java.util.Scanner; public class MyCP { public ...

  2. 补交作业-第八周PSP

    一.表格 C(分类) C(内容) S(开始时间) ST(结束时间) I(打断时间) △(净工作时间) 讨论 用户界面 9:30 10:40 15 55 编码 编码 13:20 16:30 10 180 ...

  3. 补交作业——Beta发布评论

    1.飞天小女警: 礼物挑选这一项目是很好的点子,比较能够吸引客户,更加方便快捷的挑选也满足现代人在送礼物方面的需求.这一次的发布界面效果好了很多,并且成功的发布到了云服务器上. 2.nice! : 这 ...

  4. Common xaml controls(补交作业)

    Common xaml controls 常见的xaml控件: 先上一段代码,把他们基本都实现出来: <Grid Name="MyGrid"> <Button N ...

  5. Event(补交作业)

    三种方法可以创建Eventhandler 1.

  6. Layout2:StackPanel(补交作业)

    <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" > <Rect ...

  7. Layout1:Grid(补交作业)

    Layout1:Grid 这一节我们来讲解一下一个layout:gird. 首先上一段代码: <Page x:Class="Gridstudy.MainPage" xmlns ...

  8. 对xaml的深入探究(补交作业)

    首先,下结论,看完那个外国老师的视频后,5%左右听懂了,分享给大家: 1.理解一下,xaml是特殊的xml,我们可以从代码语法看出,xaml中的打码很类似与html和xml的代码. 2.xaml.cs ...

  9. window phone8.1 hello,world(补交作业)

    第一步,我们需要创建一个简单的hello,world程序来帮助我们了解大致的方向. 下面是这个小例子的步骤: 1.打开vs,点击 文件-新建-项目:如图:

随机推荐

  1. Python、R对比分析

    一.Python与R功能对比分析 1.python与R相比速度要快.python可以直接处理上G的数据:R不行,R分析数据时需要先通过数据库把大数据转化为小数据(通过groupby)才能交给R做分析, ...

  2. Gym 100633G Nano alarm-clocks

    题目,给定n个时钟,要求把他们调成一样的时间.求最小的步数 思路:肯定是有一个时钟作为标准的啦,要找到这个时钟,怎么找呢?没其他方便的方法,暴力枚举.那么枚举后,怎么能快速地算到其他时钟转到这个时钟的 ...

  3. Java HttpURLConnection模拟请求Rest接口解决中文乱码问题

    转自:http://blog.csdn.net/hwj3747/article/details/53635539 在Java使用HttpURLConnection请求rest接口的时候出现了POST请 ...

  4. ethereumjs/ethereumjs-block-2-api

    https://github.com/ethereumjs/ethereumjs-block/blob/master/docs/index.md 详细的调用代码可见本博客的ethereumjs/eth ...

  5. linux各种压缩包的压缩和解压方法

    .tar/.war(tar是打包,不是压缩) 解包:tar xvf FileName.tar / FileName.war 打包:tar cvf FileName.tar DirName .gz 解压 ...

  6. 查看rpm包里面内容以及里面文件的内容

    如果想查看rpm包里面的内容使用命令: rpm -qpl xxxx.rpm   如果想查看rpm包里面的内容导出,而不是安装,使用命令: rpm2cpio xxxx.rpm | cpio -ivd 就 ...

  7. PAT——1032. 挖掘机技术哪家强

    为了用事实说明挖掘机技术到底哪家强,PAT组织了一场挖掘机技能大赛.现请你根据比赛结果统计出技术最强的那个学校. 输入格式: 输入在第1行给出不超过105的正整数N,即参赛人数.随后N行,每行给出一位 ...

  8. Microsoft SQL Server2008安装教程

    自己录制的视频,地址https://share.weiyun.com/5VITfph(微云分享,大小52MB,AVI格式) 视频中安装.net framework如果已经安装好了就不需要安装,也可自行 ...

  9. Linux常用命令拾遗

    查看端口对应的程序: netstat -nlap | grep 5004 输出: tcp 0 0 192.168.3.000:5004 192.118.201.00:50800 ESTABLISHED ...

  10. UITextView 光标定位

    在使用UITextView的时候, 如何在光标的位置插入字符 或者 图片? 以下Demo为你解答: 应用背景:键盘自定义emoji表情 #pragma mark - KVO - (void)obser ...