HW3.9

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的更多相关文章
- HW3 纠结的心得
改好的controller //yuec2 Yue Cheng package hw3; import java.io.File; import java.text.DecimalFormat; im ...
- 基于卷积神经网络的面部表情识别(Pytorch实现)----台大李宏毅机器学习作业3(HW3)
一.项目说明 给定数据集train.csv,要求使用卷积神经网络CNN,根据每个样本的面部图片判断出其表情.在本项目中,表情共分7类,分别为:(0)生气,(1)厌恶,(2)恐惧,(3)高兴,(4)难过 ...
- Software Testing hw3
(a):可绘制出如下图所示的流程图 (b):对于测试用例t1=(n=3)和t2=(n=5),MAXPRIMES = 4时,t1不能检查出错误,而t2则会发生数组越界错. (c):要使测试路径不通过wh ...
- HW3.29
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.28
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.27
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.26
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.25
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- HW3.24
public class Solution { public static void main(String[] args) { int number = (int)(Math.random() * ...
- HW3.23
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
随机推荐
- 宅男福利--利用Python简单爬图
Ver beta..代码粗陋. 使用说明以Windows为例, Python版本为2.7.6 确认你电脑已经安装了Python, Windows默认安装路径为C:\Python27.如果没有安装,先下 ...
- 关于博客名“大话济公”的说明
其实本来没打算起这个名字的,换了几个名字都被占用了(无语啊...).最近呢,我在研究<济公传>,对于济公的传说比较喜欢,尤其是这个任务,诙谐幽默,同时有时时刻刻在帮助有困难的群众,虽然是个 ...
- PHP完整环境搭建
Linux(CentOS 7)+ Nginx(1.10.2)+ Mysql(5.7.16)+ PHP(7.0.12) 首先安装Linux系统,我以虚拟机安装来做示例,先去下载 VitualBox,这是 ...
- Python的库和资源(转)
Python的库和资源: http://blog.sina.com.cn/s/blog_3cb6a78c0100hpaq.html Python 常用模块: http://www.pythonclub ...
- css3 旋转出现动画
@-moz-keyframes daf{ 0% { -moz-transform: rotate(-360deg) scale(0.2); -webkit-transform: rotate(-360 ...
- C# winform 弹出输入框
Microsoft.VisualBasic.dll 引用using Microsoft.VisualBasic; string PM = Interaction.InputBox("提示 ...
- 0xc0000428 winload.exe无法验证其数字签名的解决方法
只要把windows/system32/boot中的winload.exe复制到windows/system32中替换即可!! 只有启动画面会有变化,可以使用魔方等软件进行修复,恢复到之前的样子
- php smarty section使用
文件:section.tpl <html> <head> <title></title> </head> <body> {sec ...
- TC Asia Competition
250PT不说了.很水得一题. 500PT 给定n(<=1e18),求最大的因子,且这个因子为完全平方,假设这个因子为x那么满足x*x*y = n, 一直枚举因子到n^(1/3)就可以了. 最后 ...
- minicom installation and configuration on ubuntu
minicom是一个串口通信工具,就像Windows下的超级终端,可用来与串口设备通信.minicom完全通过键盘实现操作. install sudo apt-get install minicom ...