four-digit is given I chisloit to determine the sum of the first and last figure and 2 and 3 Please consider to write the program for pascal

181
uses crt; var s: String; i1, i2, err: Integer; r: Integer; begin readln (s); clrscr; val (s[1], i1, err); val (s [Length(s)], i2, err); r: = i1 + i2; writeln(r); end.
344
Answer add
varfolome

Other questions in the section - informatics
Molafit
Pascal subject Stroki1) From the keyboard is entered a line. To count How to
2020-10-26 10:00:32
Marianovich
Pascal a subject of Line 1) From the keyboard is entered the line consisting
2020-10-26 10:00:32
Kirponos
To make the program - the converter which requests type of unit of measure
2020-10-26 10:00:32
Kaebvan
In the set whole positive number N (0 & lt; N & lt; 2^10)
2020-10-26 10:00:32
Pahomiy