level 1
求一小段小写字母ASCII码之和,用ord函数,输入的是一段小写字母。例如for ‘c’ to ‘e’,然后计算这一小段小写字母的ASCII码之和。
2014年05月08日 14点05分
1
level 10
program exam;
var total,i:integer;
c:char;
begin
repeat
read(c);
total:=ord(c)+total;
until c=' ';
writeln(total);
end.
2014年05月08日 16点05分
3