| | |
500 ways to print [1..10]!
![]() |
•
•
•
•
Python
[php]
def counting(i=0):
while i < 11:
print i,
i += 1
counting()
[/php]
print range(1,11)
Note to self... pocket cup
Casio:
I don't know how to put some char's
for 0[save]a to 10 step 1[enter] a[print] next[enter]
Last edited by Anonymusius; Oct 31st, 2006 at 1:05 pm.
You said to count the number of ways by post count, so that's why I do this one in an new post.
Basic:
I did some basic on my commodore, but my parent's get pissed off every time I take it down to the television, so...
Basic:
10 L = 1 20 PRINT L 30 L = L + 1 40 IF L <= 10 then 20 50 END
how about a competition for most obfuscated 
C++

C++
#include <iostream>
int main()
{
int _0(0);
while("\"#$%&\'()*+,"[_0]!=',')
std::cout<<static_cast<int>("\"#$%&\'()*+"[_0++]-'!')<<" ";
} Last edited by Bench; Nov 6th, 2006 at 3:01 pm. Reason: Grr! The [CODE=CPP] tag filters out escape sequences!
¿umop apisdn upside down? C++
#include <iostream>
int main()
{
for(int i = 1; i <= 10; std::cout << i++);
return 0;
}#include <iostream>
int main()
{
int i = 1;
while(i <= 10 ? std::cout << i++: false);
return 0;
} How about one with a recursive function?
#include <stdio.h>
int count(int);
int main()
{
return count(0);
}
int count(int iTeller)
{
iTeller++;
printf("%d ", iTeller);
if (iTeller < 10)
count(iTeller);
else
return 0;
}![]() |
Other Threads in the IT Professionals' Lounge Forum
- Previous Thread: Merrrrryyyyy Christmas!
- Next Thread: creating skins
| Thread Tools | Search this Thread |
1gbit advertising advice amazon answers archive british broadband business businessprocesses career carrier censorship cern china cio collectiveintelligence connectivity consumer consumers corporateearnings datatransfer debtcollectors dictionary digg digital ebay ecommerce email employment environment facebook food government grid high-definition hottub infodelivery infotech intel internet interview ipod isp japan kindle lhc library malware marketing mit moonfruit news onlineshopping piracy piratebay pope porn program questions r&d religion remoteworking research retail security sex shopping simple skype smallbusiness smb sms socialmedia socialnetworking software softwareengineer spam speed spending startrek statistics stocks study stumbleupon survey tabletpc technology touch-screen touchscreen twitter uk videoinprint voips web webdeveloper windows words






