C++
# include <iostream>
# include <windows.h>
# include <cmath>
# include <iomanip>
# include <fstream>
using namespace std;
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
unsigned char C;
int kod;
cout << "Введите символ С: ";
cin >> C;
kod = C;
cout << "Код символа '" << C << "': " << kod << endl;
system ("pause");
return 0;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# include <iostream>
# include <windows.h>
# include <cmath>
# include <iomanip>
# include <fstream>
using namespace std;
int main()
{
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
unsigned char C;
int kod;
cout << "Введите символ С: ";
cin >> C;
kod = C;
cout << "Код символа '" << C << "': " << kod << endl;
system ("pause");
return 0;
}
Поделитесь своими знаниями, ответьте на вопрос:
// Внимание! Если программа не работает, обновите её версию!
begin
var a:=ArrRandom(Readinteger('n='),-50,50); a.Println;
Writeln('1й отрицательный ',a.FindIndex(x->x<0)+1,
', последний ',a.FindLastIndex(x->x<0)+1)
end.
Пример
n= 13
16 34 45 -4 1 -14 -49 10 3 23 -7 17 23
1й отрицательный 4, последний 11