Mycp补交作业

代码

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补交作业的更多相关文章

  1. mycp 补交作业

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

  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. phpMyAdmin提示“无法在发生错误时创建会话,请检查 PHP 或网站服务器日志,并正确配置 PHP 安装。”

    这是以前学生在使用phpwamp时遇到的一个问题(其他环境或是自己搭建时遇到此问题,解决方式同理) 其实这个问题与PHPWAMP本身无关,是电脑设置的问题,一般正常情况下不会出现这个问题. 现在把学生 ...

  2. Python安装Windows的pip包

    1.到https://www.python.org/downloads/ 下载python包安装python 2.到https://pypi.python.org/pypi/pip#downloads ...

  3. BZOJ 1303 中位数图 模拟

    题目链接: https://www.lydsy.com/JudgeOnline/problem.php?id=1303 题目大意: 给出1~n的一个排列,统计该排列有多少个长度为奇数的连续子序列的中位 ...

  4. Java对html标签的过滤和清洗

    OWASP HTML Sanitizer 是一个简单快捷的java类库,主要用于放置XSS 优点如下: 1.使用简单.不需要繁琐的xml配置,只用在代码中少量的编码 2.由Mike Samuel(谷歌 ...

  5. 多GPU计算

    多GPU计算已经可以说,只要是个成熟的模型,都使用了这一点. 例如: gluoncv:https://github.com/dmlc/gluon-cv/blob/master/scripts/dete ...

  6. 对deferred(延迟对象)的理解

    deferred对象从jQuery 1.5.0开始引入 什么是defrred对象 开发网站过程中,我们经常遇到某些耗时长的JS操作,其中,既有异步操作(如Ajax读取服务器数据),也有同步的操作(如遍 ...

  7. coco定义的小物体中物体大物体的尺寸

    http://cocodataset.org/#detection-leaderboard

  8. I、Q信号是如何产生的,I、Q信号复用的作用

    接收机在中频部分实现模数变换和采样,采样后的信号和数字域的同频相乘,就可以得到基带的I.Q分量.在无线接口传输时,每一种使用特定的载波频率.码(扩频码和扰码)以及载波相对相位(I或Q)的信道都可以理解 ...

  9. .NET完全手动搭建三层B/S架构

    简介:三层架构(3-tier application) 通常意义上的三层架构就是将整个业务应用划分为:表现层(WebUI).业务逻辑层(BusinessLogicLayer).数据访问层(DataAc ...

  10. elk6.*版本搭建连接 比较好一点的

    https://www.cnblogs.com/harvey2017/p/8922164.html