+ 2
When is your birthday (game)!?!?
Post your birthday, or another date that has meaning to you. But write it in a programming language you are familiar with. Have it so if someone copied the code, they could actually compile it and see your answer. Lastly, be creative ;)
9 odpowiedzi
+ 15
function Birthday (m, d) {
this.m = m;
this. d = d;
}
var myBirthday = new Birthday(05, 24);
console.log("My Birthday is: " + myBirthday.m + " / " + myBirthday.d);
+ 6
Binary
4 Bytes of memory required.
32 bits.
00001011/00001010/00000111 11010011.
+ 5
Brainfuck:
++++[++++>---<]>-.-[--->+<]>--.+++++++++.++.------------.----.---.+[--->+<]>+++.-[-->+<]>--.[-->+<]>+++.[-->+++<]>++..----.+++++++++++.-----------.++++.--..+.
+ 5
Here's one that all the languages have to use at some point in the computer:
00001011 00010100
11 20
Nov 20
+ 2
C++:
#include <iostream>
using namespace std;
int main() {
cout << "My birthday is on 20th of September";
return 0;
}
HTML:
<html>
<head><title>My birthday</title></head>
<body>
<p>"My birthday is on 20th of September"</p>
</body>
</html>
+ 1
This is written in c++!
#include <iostream>
#include <string>
using namespace std;
int main()
{
string hourOfCode = "December 5-11th";
cout << "My favorite date is the Hour of Code " << hourOfCode << endl;
return 0;
}
+ 1
from datetime import date
print(date(2015,3,24))
There you go.
+ 1
javascript: alert( (p = Math.pow, Date(17 * p(10,6) * p(7, 2) * p(3,3) * p(2,4) ) ) )
python:
import time
time.ctime( 17 * pow(10,3) * pow(7,2) * pow(2,4) )