ZOJ-1241
来源:互联网 发布:centos7搭建lnmp 知乎 编辑:程序博客网 时间:2024/04/26 10:54
import java.util.Scanner;public class Main{public static void main(String[] args){Scanner sc = new Scanner(System.in);int a = sc.nextInt();int b = sc.nextInt();int c = sc.nextInt();int i = 0;while (!(a == 0 && b == 0 && c == 0)){System.out.println("Triangle #" + ++i);if (a == -1){if (b >= c)System.out.println("Impossible.\n");elseSystem.out.format("a = %.3f\n\n", Math.sqrt(c * c - b * b));}if (b == -1){if (a >= c)System.out.println("Impossible.\n");elseSystem.out.format("b = %.3f\n\n", Math.sqrt(c * c - a * a));}if (c == -1){System.out.format("c = %.3f\n\n", Math.sqrt(b * b + a * a));}a = sc.nextInt();b = sc.nextInt();c = sc.nextInt();}}}
0 0
- zoj 1241
- ZOJ-1241
- ZOj Problem Set-1241
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- ZOJ
- poj2418
- 线程锁EnterCriticalSection和LeaveCriticalSection的用法
- 我的学习
- 在navigationBar上面添加多个任意控件
- hadoop 数据倾斜
- ZOJ-1241
- linux下创建和删除软、硬链接
- Passing Data between View Controllers
- 35个非主流开源数据库你知道吗?
- Eclipse 快捷键大全
- curl 实现qq挂号登录
- XMLHelper 类
- 百度地图API开发指南
- ActiveMQ的消息重发与死信管理(DLQ)