Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class ExchangeIfGreater
- {
- static void Main()
- {
- Console.Write("a = ");
- double a = double.Parse(Console.ReadLine());
- Console.Write("b = ");
- double b = double.Parse(Console.ReadLine());
- double c;
- if (a > b)
- {
- c = a;
- a = b;
- b = c;
- Console.WriteLine("{0} {1}", a, b);
- }
- else
- {
- Console.WriteLine("{0} {1}", a, b);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement