greatest among three numbers
public class Solution {
public static void main(String[] args) {
Scanner ip = new Scanner(System.in);
System.out.print("Enter A: ");
int a = ip.nextInt();
System.out.print("Enter B: ");
int b = ip.nextInt();
System.out.print("Enter C: ");
int c = ip.nextInt();
int great = a >= b ? (a >= c ? a : c) : (b >= c ? b : c);
System.out.println("Greatest among three numbers is: " + great);
ip.close();
}
}
OUTPUT:
Enter A:
Enter B:
Enter C:
Greatest among three numbers is:
greatest among three numbers的更多相关文章
- ural 1352. Mersenne Primes
1352. Mersenne Primes Time limit: 1.0 secondMemory limit: 64 MB Definition. If the number 2N−1 is pr ...
- Must practice programming questions in all languages
To master any programming languages, you need to definitely solve/practice the below-listed problems ...
- HDU 1423 Greatest Common Increasing Subsequence LCIS
题目链接: 题目 Greatest Common Increasing Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: ...
- The Hundred Greatest Theorems
The Hundred Greatest Theorems The millenium seemed to spur a lot of people to compile "Top 100& ...
- POJ 2127 Greatest Common Increasing Subsequence -- 动态规划
题目地址:http://poj.org/problem?id=2127 Description You are given two sequences of integer numbers. Writ ...
- HDOJ 1423 Greatest Common Increasing Subsequence -- 动态规划
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1423 Problem Description This is a problem from ZOJ 2 ...
- Geeks Interview Question: Ugly Numbers
Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence1, 2, 3, 4, 5, 6, 8, 9, ...
- Working with Numbers in PL/SQL(在PL/SQL中使用数字)
This article gives you all the information you need in order to begin working with numbers in your P ...
- HDU1423:Greatest Common Increasing Subsequence(LICS)
Problem Description This is a problem from ZOJ 2432.To make it easyer,you just need output the lengt ...
随机推荐
- PHP高级进阶梳理
基础篇 1.深入理解计算机系统 2.现代操作系统 3.C程序设计语言 4.C语言数据结构和算法 5.Unix环境高级编程 6.TCP/IP网络通信详解 7.Java面向对象编程 8.Java编程思想 ...
- python asyncio wait和gather
1. wait, 等待某某执行完成以后才执行下一步 FIRST_COMPLETED = concurrent.futures.FIRST_COMPLETED FIRST_EXCEPTION = con ...
- C# 中如何创建异步平行任务?
解释都在代码里,直接贴代码了: private async void btnStartRequestResource_Click(object sender, EventArgs e) { ShowA ...
- [Node.js] TypeScript 实现 sleep 函数
看过不少网友的文章, 有各种方法, 但我想要的是一个能线性执行的sleep函数. /** * 等待指定的时间 * @param ms */ static async sleep(ms: number) ...
- ABAP 新语法-实例讲解
主要内容 内联声明 构造表达式 内表操作 Open SQL 其他 本文列出了ABAP新语法的一些使用方式,供大家学习参考. 内联声明 代码实现: *&--------------------- ...
- abstract,virtual,override
1.abstract 可以修饰类和方法,修饰方法时只声明不实现: 2.继承实现abstract类必须通过override实现abstract声明的方法,而virtual方法可选择override(重写 ...
- SQLMap常用教程
先安装 python环境(2.6.x或2.7版本) ,再将SQLMap 放在安装目录下 注意:sqlmap只是用来检测和利用sql注入点的,并不能扫描出网站有哪些漏洞,使用前请先使用扫描工具扫出sql ...
- Nexus6P 设置Debug模式
一劳永逸,设置手机进入Debug模式实现完美Root 使用mkbootimg进行boot.ing编辑 将修改的系统官方Rom包中的boot.ing和mkbooting工具中的mkboot.mkboot ...
- Linux系统下安装jdk及环境配置(两种方法)
https://blog.csdn.net/qq_42815754/article/details/82968464 这里介绍两种linux环境下jdk的安装以及环境配置方法在windows系统安装j ...
- CentOS7安装Oracle11gR2
转自E路情人https://www.cnblogs.com/Q1013588888/p/9219128.html 一.安装CentOS-7_x86_64 1.CentOS7:带GUI的服务器(FTP ...