• перераспределить значения переменных х и у так чтобы в х оказалось большее из этих значений а в у меньшее C#

Ответы 2

  • спасибо
  • using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace pzn{     class Program    {       public static void Main(string[] args)        {            int x = Convert.ToInt32(Console.ReadLine());            int y = Convert.ToInt32(Console.ReadLine());            int temp;            if (x<y)            {                x ^= y;                y ^= x;                x ^= y;                }            Console.WriteLine("x={0}, y={1}", x, y);            Console.ReadKey();        }    }}
    • Автор:

      gus35
    • 5 лет назад
    • 0
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years