-4
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
Also,
ThRUsday -> ThRU
: Are you stripping the last four characters there? – Geobits – 2014-04-03T17:40:19.063@m.buettner thanks I fixed that anything else ? – Mukul Kumar – 2014-04-03T17:47:12.100
Whoa,..Whoa I am getting negative attacks, I would like to know why? BTW I have changed the question from day-names to words. – Mukul Kumar – 2014-04-03T17:55:30.917
1@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. – Justin – 2014-04-03T20:01:05.890