import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter the ISBN: ");
         int d1 = input.nextInt();
         int d2 = input.nextInt();
         int d3 = input.nextInt();
         int d4 = input.nextInt();
         int d5 = input.nextInt();
         int d6 = input.nextInt();
         int d7 = input.nextInt();
         int d8 = input.nextInt();
         int d9 = input.nextInt();

         input.close();

         int d10 = (d1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5 + d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9) % 11;

         if(d10 == 10)
             System.out.println("" + d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + 'X');
         else
             System.out.println("" + d1 + d2 + d3 + d4 + d5 + d6 + d7 + d8 + d9 + d10);
     }
 }

HW3.9的更多相关文章

  1. HW3 纠结的心得

    改好的controller //yuec2 Yue Cheng package hw3; import java.io.File; import java.text.DecimalFormat; im ...

  2. 基于卷积神经网络的面部表情识别(Pytorch实现)----台大李宏毅机器学习作业3(HW3)

    一.项目说明 给定数据集train.csv,要求使用卷积神经网络CNN,根据每个样本的面部图片判断出其表情.在本项目中,表情共分7类,分别为:(0)生气,(1)厌恶,(2)恐惧,(3)高兴,(4)难过 ...

  3. Software Testing hw3

    (a):可绘制出如下图所示的流程图 (b):对于测试用例t1=(n=3)和t2=(n=5),MAXPRIMES = 4时,t1不能检查出错误,而t2则会发生数组越界错. (c):要使测试路径不通过wh ...

  4. HW3.29

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  5. HW3.28

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  6. HW3.27

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  7. HW3.26

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  8. HW3.25

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  9. HW3.24

    public class Solution { public static void main(String[] args) { int number = (int)(Math.random() * ...

  10. HW3.23

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

随机推荐

  1. 2014年度辛星html教程夏季版第五节

    如果读者是一位后台开发者,那么肯定会知道什么叫表单,这里我们就介绍一下前台如何使用表单,表单的使用也是我们编写网页的必须经历的一关,而且,表单也往往是我们网站的漏洞和弱点出现的地方. ******** ...

  2. 聊聊iOS开发中耳机的那点事(监听耳机拔插、耳机线控)-b

    如果说一个项目出现的最重大的事故,那无疑就是开发人员使用了不可控的元素. 前言 iOS开发当中有关于视音频播放的开发不在少数,用户时常会使用到一种输出设备,那就是"耳机",这一篇博 ...

  3. 仿window阿里旺旺登陆界面,打印机吐纸动画效果-b

    偶然的机会发现window的阿里旺旺的登陆效果蛮有意思的,于是就模仿着做了一下打印机吐纸的动画效果看起来很神奇的东西,实现起来却不难,下面我给大家看下主要的源码. - (void)createUI{ ...

  4. caffe之(五)loss层

    在caffe中,网络的结构由prototxt文件中给出,由一些列的Layer(层)组成,常用的层如:数据加载层.卷积操作层.pooling层.非线性变换层.内积运算层.归一化层.损失计算层等:本篇主要 ...

  5. The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'.

    Exception when executing ) br is a binary reader. The data to peak is D000 (D0=208) The cause is, fo ...

  6. Highcharts资料

    对应的API:   http://api.hcharts.cn/#chart.events 对应的中文网实例:http://www.hcharts.cn/demo/highcharts/dynamic ...

  7. c++ 内存泄露的检查

    对于c++的内存泄露检测,除了我们自己手动检查以外,还可以使用c++中的函数来帮助我们检测, 如下代码: #include "stdafx.h" #include <stri ...

  8. gei shilei d

    body, p { margin: 0; padding: 0; font-size: 16px; } div { margin: 0 auto; } .wrapper { width: 1080px ...

  9. WP8教程

    http://www.maiziedu.com/courses-list?technology_category=6

  10. 服务器部署_centos 安装nginx手记

    前言: a.linux上安装nginx网上有很多文章,本文仅仅是自己整理备忘. b.安装centos的时候,把develop相关组件都装上,免得缺这个缺哪个. c. 本文软件版本:nginx-1.2. ...