Frage

I want to email a small piece of code to my math teacher, in order to demonstrate a point (demonstrate something I wrote in the homework). The code needs to be:

  1. Runnable on Linux - because that is my operating system.
  2. Runnable on Windows - because that is my teacher's operating system.
  3. Runnable with a click - because I don't want him to bother and install any software.
  4. Plain text - so that the teacher can read the code and understand what it does.

What language can I use?

War es hilfreich?

Lösung

I personally would suggest HTML / Javascript. You can send anyone a flat HTML file and have them open it in Chrome and it should work the same as your Chrome, as long as it's simple.

(Note: Or Firefox; the only problem with Chrome / Firefox is that browser version compatibility is a pain in the tail)

Andere Tipps

As Dylan B noted the answer is JavaScript, but I have a stronger reason for suggesting it.

Not everyone knows JavaScript nor cares to learn JavaScript, and while JavaScript is one of the de facto languages for use with an Internet browser (choose most any) there is a good chance that you can write your code in the language of your choice and convert it into JavaScript.

See: List of languages that compile to JS

HTML and JavaScript defiantly in my opinion.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top