ASCII in Pascal programming

Status
Not open for further replies.

uidemy

Estimable
Dec 13, 2015
3
0
4,510
A message encryption system that translates message characters to its ASCII equivalent.
Please i need help on the above question.
<<Email address removed by moderator. Communicate in the threads of via PM. Never post your email address.>>
 

uidemy

Estimable
Dec 13, 2015
3
0
4,510
I don't know the encryption algorithm to use but, this is my work so far...

Program Youmi;
uses crt;
var
message: string[255];
asciival:array[1..255] of byte;
i: integer;

Procedure Getdecimi

begin
writeln('Enter you message');readln(message);
For i:= 1 to length (message) do
asciival:=(ord(message));
end.

Please am new to programming and am not get the encryption syntax right.



 
- there is no "encryption syntax" right. You have to invent your own way of encoding your message (eg replace each letter with next one in the alphabet)
- your "FOR" loops looks almost right, but the content is not. You have to "index" the content of "message" and "asciival" appropriately, like in "asciival := encrypt(message);
- "ord" returns integer, while "asciival" element are chars
 
Status
Not open for further replies.