-4
\$\begingroup\$

Write a code in your favorite language which reduces words To first three characters.

Input  : One word  
Output : First three letters

For example

INPUT  : ProGramming
OUTPUT : Pro

INPUT  : puZZles
OUTPUT : puZ

INPUT  : BoWling
OUTPUT : BoW

Output needs to be case sensitive

Rule-1
All statements should be meaningful and useful.
For example
the C++ snippet below surely increases the score but is unnecessary.
The similar code snippets below is banned.

std::cout<<"abcabc";
std::cout<<"\b\b\b\b\b\b";  

Rule-2
Do not use infinite add-subtract or multiplication-division (or any other kind of) infinite progressions to increase the score.
For example
The similar code snippets below is banned.

if(strcmp(str,"monday")==0)  //The function strcmp() returns 0 if both
                             //strings are same (including NULL character)
cout<<110+1-1+1-1+1-1....inf //110 is ASCII value of 'm'  

Winner
Winner will be chosen on the basis of score (Most score wins) after 4 days from now.
If there is a tie then the one who submitted the answer first is the winner

\$\endgroup\$
  • \$\begingroup\$ Also, ThRUsday -> ThRU: Are you stripping the last four characters there? \$\endgroup\$ – Geobits Apr 3 '14 at 17:40
  • \$\begingroup\$ @m.buettner thanks I fixed that anything else ? \$\endgroup\$ – Mukul Kumar Apr 3 '14 at 17:47
  • \$\begingroup\$ Whoa,..Whoa I am getting negative attacks, I would like to know why? BTW I have changed the question from day-names to words. \$\endgroup\$ – Mukul Kumar Apr 3 '14 at 17:55
  • 1
    \$\begingroup\$ @MukulKumar One big reason for the big negative votes is that the question was very trivial in between a whole bunch of other low-quality questions. When people see enough low-quality questions, they automatically downvote other questions which could be improved. \$\endgroup\$ – Justin Apr 3 '14 at 20:01
2
\$\begingroup\$

Befunge 98, 6 bytes

~~~,,,

Any other statements would be meaningless and useless. I could possibly do this though (18 bytes):

3^,<
 @
 w~^
 0
 :

But everything but the , and the ~ are meaningless and useless because it could be done so much simpler.

\$\endgroup\$
  • \$\begingroup\$ DUDE, This is Code-Bowling means you have to write longest code and not some Code-Trolling or Code-Golf \$\endgroup\$ – Mukul Kumar Apr 3 '14 at 17:46
  • 1
    \$\begingroup\$ @MukulKumar This was the longest I could write :-) \$\endgroup\$ – Justin Apr 3 '14 at 17:46
  • \$\begingroup\$ I have changed the question again please read the question again \$\endgroup\$ – Mukul Kumar Apr 3 '14 at 17:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.