Ответ:
using System;
namespace ConsoleApp1
{
class Program
static void Main(string[] args)
int A, B, C, D, tmp;
Console.Write("Введите A: ");
A = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите B: ");
B = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите C: ");
C = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите D: ");
D = Convert.ToInt32(Console.ReadLine());
tmp = A;
A = D;
D = C;
C = B;
B = tmp;
Console.WriteLine("Новые значения:");
Console.WriteLine("A = " + A);
Console.WriteLine("B = " + B);
Console.WriteLine("C = " + C);
Console.WriteLine("D = " + D);
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int A, B, C, D, tmp;
Console.Write("Введите A: ");
A = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите B: ");
B = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите C: ");
C = Convert.ToInt32(Console.ReadLine());
Console.Write("Введите D: ");
D = Convert.ToInt32(Console.ReadLine());
tmp = A;
A = D;
D = C;
C = B;
B = tmp;
Console.WriteLine("Новые значения:");
Console.WriteLine("A = " + A);
Console.WriteLine("B = " + B);
Console.WriteLine("C = " + C);
Console.WriteLine("D = " + D);
}
}
}