![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#491 |
|
Hobbyist Programmer
|
Bah, here's about as far as I got on an INTERCAL one, it ends in error, but it prints out '1-10,' I haven't quite yet thought of a way to get it to just end, so I guess it'll just have to do spitting out an error at the end until I figure it out.
408) INTERCAL PLEASE ABSTAIN FROM (10) (10) PLEASE LOOK OUT HERE I COME (40) DO .1 <- #153~#212 PLEASE STASH .1 DO .1 <- #9 PLEASE STASH .1 DO .1 <- #8 PLEASE STASH .1 DO .1 <- #7 PLEASE STASH .1 DO .1 <- #6 PLEASE STASH .1 DO .1 <- #5 PLEASE STASH .1 DO .1 <- #4 PLEASE STASH .1 DO .1 <- #3 PLEASE STASH .1 DO .1 <- #2 PLEASE STASH .1 DO .1 <- #1 PLEASE STASH .1 DO :3 <- #0$#256 PLEASE FORGET .3 DO ;5 <- "!3~#4'"$#3 DO .14 <- '#0$#0'$#0 DO :3 <- #3 DO :53 <- #21 DO :1 <- #&2 DO .53 <- '#4$#1'$#0 DO .6 <- #0 DO .9 <- #2 DO :12 <- #12~.9 DO ;2 <- #2 DO .44 <- .4 DO .4 <- .44 DO COME FROM (2037) PLEASE RETRIEVE .1 DO :6 <- #V45 DO ,2 <- #V33 PLEASE DO :9 <- !9~#2'~#5 (2037) PLEASE READ OUT .1 DO .2 <- #5 DO .2 <- #6 DO :1 <- '#1$#1'~#4 DO ;5 <- #12$#1 DO .4 <- #65535 DO .4 <- .3$#3 PLEASE GIVE UP |
|
|
|
|
|
#492 |
|
Hobbyist Programmer
|
409) Batch
@echo off set x=1 :loopy echo %x% > %TEMP%\%x%.txt notepad %TEMP%\%x%.txt set /a x=x+1 IF %x% neq 10 goto loopy
__________________
Hoes telling me to calm down but I'm like fuck that shit!
|
|
|
|
|
|
#493 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 155
Rep Power: 3
![]() |
410) C++
#include <iostream>
int main()
{
int i = 0;
while(i != ('2'*2)/'\n')
std::cout << ++i << static_cast<char>(32);
return 0;
}
__________________
-- v0id
|
|
|
|
|
|
#494 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3
![]() |
You C++ people need to be a little more creative than changing around your loop conditions...
411) C++ cpp Syntax (Toggle Plain Text)
|
|
|
|
|
|
#495 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3
![]() |
ugly code, but it works...
412) C++ cpp Syntax (Toggle Plain Text)
|
|
|
|
|
|
#496 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3
![]() |
this is more fun than I expected....
413) C++ cpp Syntax (Toggle Plain Text)
|
|
|
|
|
|
#497 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 155
Rep Power: 3
![]() |
414) C++
Some exception. #include <iostream>
class OneToTen
{
public:
void Loop()
{
for(int i = 0; i <= 10; i++)
{
try
{
throw i;
}
catch(int Value)
{
std::cout << Value << " ";
}
}
}
};
int main()
{
OneToTen StartThe;
StartThe.Loop();
return 0;
}
__________________
-- v0id
|
|
|
|
|
|
#498 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3
![]() |
415) C++
cpp Syntax (Toggle Plain Text)
|
|
|
|
|
|
#499 |
|
Hobbyist Programmer
Join Date: Apr 2006
Posts: 155
Rep Power: 3
![]() |
416) C++
#include <iostream>
#include <string>
bool Splitting(std::string &Destination, std::string &Source, char Delim)
{
if(Source.empty())
return false;
std::string::size_type pos = Source.find(Delim);
Destination = Source.substr(0, pos);
if(pos != std::string::npos)
Source = Source.substr(pos + 1);
else
Source = "";
return true;
}
int main()
{
std::string String = "1|2|3|4|5|6|7|8|9|10";
std::string Stub;
while(Splitting(Stub, String, '|'))
std::cout << Stub << " ";
return 0;
}
__________________
-- v0id
|
|
|
|
|
|
#500 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 754
Rep Power: 3
![]() |
I don't remember seeing this one...
417) C++ cpp Syntax (Toggle Plain Text)
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|