|
-
Jan 23rd, 2000, 11:29 AM
#1
Thread Starter
Junior Member
I need a Pascal program that allows the user
to enter a three-digit number and the number will print in reverse order. The reverse number should use a variable and it shouldn't print each of the digits separately.
-
Jan 23rd, 2000, 01:23 PM
#2
Addicted Member
kazooie21,
I don't really remember the whole syntax
(long time I've never used Pascal),
hope this can help
---------
var mystring = string;
d1, d2, d3 = integer;
uses crt;
Begin
write "please enter digit 1";
readln (d1);
write "please enter digit 2";
readln (d2);
write "please enter digit 3";
readln (d3);
mystring = str(d3) + str(d2) + str(d1)
writeln "result = " + mystring
readkey;
End
-------
By the way this is VB forum
Regards
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|