Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 1337 7ra|\|51a73r
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
person




PostPosted: Sat Feb 26, 2005 2:01 pm   Post subject: 1337 7ra|\|51a73r

i know there r many forms of l33t but i got board and made a translator btw i know its not that great and please no caps
Sponsor
Sponsor
Sponsor
sponsor
Flikerator




PostPosted: Sat Feb 26, 2005 6:05 pm   Post subject: (No subject)

Loop it, and have get ----? get:* to get sentences.

Also the words don't look very right..

Also for the caps thing, take each letter one by one and make it into a non cap. I think there is an easy way to do it, if I remember ill repost.
cycro1234




PostPosted: Sun Feb 27, 2005 12:34 pm   Post subject: (No subject)

Good job Smile
Paul




PostPosted: Sun Feb 27, 2005 1:06 pm   Post subject: (No subject)

Flikerator wrote:
Loop it, and have get ----? get:* to get sentences.

Also the words don't look very right..

Also for the caps thing, take each letter one by one and make it into a non cap. I think there is an easy way to do it, if I remember ill repost.

Simple string manipulation
run a for loop the length of entire string (length(word)), create another string variable (ex: word2) to hold the lower case string.

check if each letter of the original string is uppercase, if yes then word2+=(chr(ord("word(a)")+32))
if not then
word2+=word(a)

when the for loop ends, you have your original sentence, in lower case.
Bacchus




PostPosted: Sun Feb 27, 2005 1:11 pm   Post subject: (No subject)

Flikerator wrote:

Also for the caps thing, take each letter one by one and make it into a non cap. I think there is an easy way to do it, if I remember ill repost.

add a certain amount in the ordinal value if its in caps to make it non-caps, pretty sure that number was 32 or something
code:
fcn downsize (word : string) : string
    const letters := "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    var endword : string := ""
    for i : 1 .. length (word)
        if index (letters, word (i)) ~= 0 then
            endword += chr (ord (word (i)) + 32)
        else
            endword += word (i)
        end if
    end for
    result endword
end downsize
Drakain Zeil




PostPosted: Thu Mar 03, 2005 6:36 am   Post subject: (No subject)

I made one of these, they're fun. You should now try something like basic encryption or even compression.
person




PostPosted: Thu Mar 03, 2005 8:33 pm   Post subject: (No subject)

funny thing with incription is that a lot of contests such as last years CCC had questions about them
Drakain Zeil




PostPosted: Fri Mar 04, 2005 7:01 am   Post subject: (No subject)

It is a cool topic.

This years j2 was related to it, but it just required finding RSA numbers betweeen x and y.[/i]
Sponsor
Sponsor
Sponsor
sponsor
beard0




PostPosted: Sun Mar 20, 2005 8:49 pm   Post subject: (No subject)

Turing Manual wrote:
Str.Lower Part of Str module

Syntax Str.Lower (s : string) : string

Description The Str.Lower function takes the string s and returns a string in which all the upper case letters are converted to lower case. For example, Str.Lower ("ABC123def") returns "abc123def".

Example This program obtains lines of text from the user and outputs the lines converted to lower case.

code:
var line : string
loop
    put "Enter a line of text (empty to quit): " ..
    get line : *
    exit when line = ""
    put "The lower case version: ", Str.Lower (line)
end loop



Status Exported qualified.
This means that you can only call the function by calling Str.Lower, not by calling Lower.


See also Str.Upper and Str.Trim.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: