How to add code to existing article (Using Improve Article)?
Prerequisite : How to Improve an Article ?
- Click on “Improve Article” button present at below of each article. This is one of the three buttons below the article’s tag.
- Other than adding code, modifying content of article must be avoided.
- Sequence for code should be in following order –
- Mention ‘LanguageName – Code Addition‘ in Reason to Improve box and submit for review.
To Add a new code:
-
Click on the Add Code button present in the Toolbar provided.
- Click on the Add Another Language button and further select the language to be added from the drop-down list provided.
-
Use the Arrow Keys to change the sequence of the codes. The preferred sequence is given in the 3rd point above.
- To Format your code, use the Format button provided. Further, use the Run button to check if your code generates the correct output and click on the Proceed button to add your code with the other existing codes.
Code Style Guidelines:
- In the beginning of every program, please write a line to tell the purpose of program :
// C++ program to illustrate sum of two numbers
chevron_rightfilter_none- Variables used in the code, program structure and output should match with the existing code.
- Please add following comment at the bottom of your code.
// This code is contributed by your_name
- Variable names and output of newly added code (for example Java) should be same as existing code (For example C++).
- It is strongly recommended to refer general coding guidelines when adding code for any language.