skip to main
|
skip to sidebar
Mbvreddy's Collection
Wednesday, September 17, 2008
Programming puzzle - 2
int main()
{
if(condition)
{
printf("Hello!");
}
else
{
printf("mbvreddy");
}
return 0;
}
Write the condition in the above program such that output would be "Hello!mbvreddy"
Monday, September 15, 2008
Math Trick - 1
1. Grab a calculator. (you won't be able to do this one in your head)
U CAN USE THE CALCULATOR IN UR COMPUTER...
2. Key in the first six digits of your mobile number
3. Multiply by 80
4. Add 1
5. Multiply by 250
6. Add the last 4 digits of your phone number
7. Add the last 4 digits of your phone number again.
8. Subtract 250
9. Divide number by 2
Do you recognize the answer... Huh..!!
Saturday, September 13, 2008
Programming Puzzle - 1
int main()
{
int i,n=20;
for(i=0;i<n;i--)
printf("*");
return 0;
}
Change/add only one character in the above program and print '*' exactly 20 times..
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Followers
Blog Archive
►
2009
(9)
►
July
(1)
►
June
(4)
►
May
(2)
►
April
(1)
►
January
(1)
▼
2008
(16)
▼
September
(3)
Programming puzzle - 2
Math Trick - 1
Programming Puzzle - 1
►
August
(1)
►
July
(4)
►
June
(2)
►
April
(1)
►
February
(1)
►
January
(4)
►
2007
(16)
►
November
(1)
►
September
(3)
►
August
(7)
►
July
(5)
About Me
mbvreddy
Bangalore, Karnataka, India
!!..Always Cool..!!
View my complete profile