The problem of “Hello World” is that it is not clear in advance where this very “Hello World” will be displayed. Whether in the console, or in the browser window, or in the MessageBox, or in the debug window.
The problem - “Minute” shows exactly the object representation of the language. How easy it is to access the meaning of a minute of the current time in different languages.
Therefore, below are examples of just getting the current minute. If for example: 8:26:30, then in the end we should get 26.
It does not matter the number or number.
I want to add a restriction: without using additional libraries.
Javascript:
var a = (new Date ()). getMinutes ();
PHP:
$ min = date ('i');
$ min = date ('i', $ timestamp);
')
C ++ Builder:
TDateTime DT = Now ();
Word hour, min, sec, msec;
DecodeTime (DT, hour, min, sec, msec);
ShowMessage (min);
Perl:
$ a = time;
my ($ sec, $ min, $ hour, $ mday, $ mon, $ year, $ wday) = (localtime ($ a)) [0,1,2,3,4,5,6];
Like that…
C #:
var min = DateTime.Now.Minute;
Python:
from datetime import datetime
m = datetime.now (). minute
Brainfuck:
++++++++++ [> +++++++> +++++++++> +++> ++
.> +. +++++++ .. +++.> ++. . +++.
------.--------.> +.>.
Ruby:
Time.now.min
Who will add for other languages?