Rosetta Code:Solve a Task: Difference between revisions

Line 12:
It is best to read the task thoroughly, solve it, and check your solution ''before'' starting to edit the Rosetta Code page, (especially for tasks needing more than a very short solution).
 
10 DEF FNBENFORD(N)=LOG(1+1/N)/LOG(10)
==Adding Code==
20 CLS
Language examples on each page are in alphabetical order, so you need to find where your example would fit. Once you've found that, click the "edit" link closest above the area where you want to insert your code on the task page, and add something like this to the bottom of the edit field:
30 PRINT "One digit Benford's Law"
 
40 FOR i = 1 TO 9
<pre>
50 PRINT i,:PRINT USING "##.######";FNBENFORD(i)
=={{header|Ayrch}}==
60 NEXT i
<syntaxhighlight lang="ayrch">PRINT "Goodbye, World!"</syntaxhighlight>
70 END
</pre>
Remember, for the sake of simplicity, we're assuming your language is Ayrch, and the task is [[Hello world]]. We're also assuming, for the moment, that Ayrch looks a lot like BASIC.
Once you've added your code, hit the preview button to make sure you crossed all your T's and closed all your tags. If the language name shows up in red (a broken link), then either the language doesn't exist on the site yet (as a category), or you misspelled/mis-capitalized the name. Check your spelling against the one in [[:Category:Programming Languages]].
That's all you really need to do!
 
=Going a little further=
6

edits