老师好:我昨天做完时已经是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. Java 基本语法(关键字、标识符、常量、注释)

    1. Java 程序的构成 对象(object):对象是类的一个实例,有状态和行为. 类(class):类是一个模板,它描述一类对象的行为和状态. 方法(method):方法就是行为,一个类可以有很多 ...

  2. 021.12 IO流 ObjectStream对象序列化

    内容:通过文件存储对象我们遇到的问题,需要保存对象到硬盘中,如何解决这个就是用来解决的 用法:1.创建流对象FileOutputstream2.创建ObjectOutputStream对象与FileO ...

  3. java冒泡排序-选择排序-插入排序-使用API中文文档直接调用函数

    import java.util.Arrays; public class ArrayDemo2_3 { public static void main(String []args) { //---- ...

  4. Innodb_io_capacity 对于IO稳定性的一些研究

    背景:最近在做一台线上服务器IO负载情况的时候发现了以下现象: 24小时的IO_UTIL 的曲线看似风平浪静,毛刺较少 但当图片放大到半小时级别的时候发现IO_UTIL即磁盘使用率出现了规律性的波动, ...

  5. 使用zepto实现QQ消息左滑删除效果

    有这样一个需求: 1. 有一个列表,将每一个列表项左滑动出现删除按钮: 2. 右滑动隐藏删除按钮: 3. 点击这个删除按钮删除该列表项. 完成以后的效果: 这是微信网页端的页面,使用的是 zepto ...

  6. iOS UI的几种模式

    iOS UI的几种模式: 1.平凡模式(原生控件组合): 2.新闻模式: 3.播放器模式: 4.微博模式:

  7. 【转】Faster RCNN 原理

    看过好几篇讲Faster RCNN的文章,有一些基础以后,看这个文章是最好的. https://www.cnblogs.com/wangyong/p/8513563.html

  8. [19/04/29-星期一] GOF23_行为型模式(责任链模式、迭代器模式)

    一.行为模式 二.责任链模式(chainOfResponsibility) [一个请求类] /*** 请假类 * 封装请假的基本信息 */ package cn.sxt.chainOfResponsi ...

  9. 【jQuery】cookie插件

    通过该插件的学习使我对cookie.Date().getDate().setDate().toUTCString()有了更直观的了解,具体分析见注释: function(key, value, opt ...

  10. PHP导出excel表格

    <?php header('Content-Type: application/force-download'); header("Content-type: text/html; c ...