Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Test
- {
- public static void Main()
- {
- double a, b, c;
- string s;
- s = Console.ReadLine();
- a = double.Parse(s);
- s = Console.ReadLine();
- b = double.Parse(s);
- s = Console.ReadLine();
- c = double.Parse(s);
- double max, min;
- if (a >= b){
- if (a >= c){
- max = a;
- }else{
- max = c;
- }
- }else{
- if (b >= c){
- max = b;
- }else{
- max = c;
- }
- }
- if (a <= c && a <= b){
- min = a;
- }else if (c <= a && c <= b){
- min = c;
- }else{
- min = b;
- }
- Console.WriteLine("Maximum: " + max);
- Console.WriteLine("Minimum: " + min);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement