Home
О нас
Products
Services
Регистрация
Войти
Поиск
5134541p4ncrh
@5134541p4ncrh
July 2022
1
8
Report
PascalABCNET : Ввести и упорядочить последовательность из N натуральных чисел таким об-разом, чтобы она возрастала до середины, а затем убывала.
Please enter comments
Please enter your name.
Please enter the correct email address.
Agree to
terms of service
You must agree before submitting.
Send
Answers & Comments
petyaGavrikov
Verified answer
// PascalABC.NET 3.3
begin
var n:=ReadInteger;
var a:=ArrRandom(n,10,90); a.Println;
a:=a[0:n div 2].Sorted.ToArray+a[n div 2:n].SortedDescending.ToArray;
a.Println;
end.
Пример:
10
82 83 53 79 31 34 24 66 47 44
31 53 79 82 83 66 47 44 34 24
1 votes
Thanks 0
×
Report "PascalABCNET : Ввести и упорядочить последовательность из N натуральных чисел та..."
Your name
Email
Reason
-Select Reason-
Pornographic
Defamatory
Illegal/Unlawful
Spam
Other Terms Of Service Violation
File a copyright complaint
Description
Helpful Links
О нас
Политика конфиденциальности
Правила и условия
Copyright
Контакты
Helpful Social
Get monthly updates
Submit
Copyright © 2025 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
// PascalABC.NET 3.3begin
var n:=ReadInteger;
var a:=ArrRandom(n,10,90); a.Println;
a:=a[0:n div 2].Sorted.ToArray+a[n div 2:n].SortedDescending.ToArray;
a.Println;
end.
Пример:
10
82 83 53 79 31 34 24 66 47 44
31 53 79 82 83 66 47 44 34 24