#define N 10
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "Rus");
int mas[N];
cout << "Исходный массив: ";
for (int i = 0; i < N; i++) {
cin >> mas[i];
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < N-1; j++) {
if (mas[j] > mas[j + 1]){
int d = mas[j];
mas[j] = mas[j + 1];
mas[j + 1] = d;
}
}
}
cout << "\nОтсортированный массив: ";
for (int i = 0; i < N; i++)
cout << mas[i] << " ";
return 0;
}
stdout:
/temp/compiling/source.bas(1) error 3: Expected End-of-Line, found 'Pascal'
Pascal;
^
/temp/compiling/source.bas(2) error 10: Expected '=', found ';'
Var;
^
/temp/compiling/source.bas(3) error 3: Expected End-of-Line, found '�'
a,b:integer;
^
/temp/compiling/source.bas(4) error 10: Expected '=', found ';'
Begin;
^
/temp/compiling/source.bas(5) error 3: Expected End-of-Line, found '�'
read(a,b);
^
/temp/compiling/source.bas(6) error 3: Expected End-of-Line, found '�'
write(a+b);
^
/temp/compiling/source.bas(7) error 10: Expected '='
End.
^
/temp/compiling/source.bas(9) error 3: Expected End-of-Line, found '�'
Язык C++
^
/temp/compiling/source.bas(11) error 145: Only valid in -lang fb or deprecated or fblite, found 'using'
using namespace std;
^
/temp/compiling/source.bas(12) error 6: Expected '(', found 'main'
int main() {
^
/temp/compiling/source.bas(12) error 132: Too many errors, exiting
stderr: