using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int A, B, C, 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());
tmp = A;
A = C;
C = B;
B = tmp;
Console.WriteLine("Новые значения:");
Console.WriteLine("A = " + A);
Console.WriteLine("B = " + B);
Console.WriteLine("C = " + C);
}
}
}
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int A, B, C, 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());
tmp = A;
A = C;
C = B;
B = tmp;
Console.WriteLine("Новые значения:");
Console.WriteLine("A = " + A);
Console.WriteLine("B = " + B);
Console.WriteLine("C = " + C);
}
}
}
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
using namespace std;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
srand(time(NULL));
const int N = 10;
int a[N];
int mx = -200, mn = 200;
for(int i = 0; i < N; i++)
{
a[i] = rand() % 101 + 50;
mn = min(mn,a[i]);
mx = max(mx,a[i]);
}
cout << mx << " " << mn;
}