• About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy Policy
  • Change the purpose of use

Tnhelearning.edu.vn - Various useful general information portal

  • Photo
  • Bio
  • How To
  • Tech

How to Write Programs in Notepad

November 23, 2023 by admin Category: How To

You are viewing the article How to Write Programs in Notepad  at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.

Notepad may seem like a simple and minimalistic text editor, but it can actually be a powerful tool for writing and running programs. Whether you are a beginner looking to explore the world of programming or an experienced programmer seeking a lightweight and versatile coding environment, Notepad has got you covered. In this guide, we will walk you through the process of writing and executing programs in Notepad, providing you with the essential knowledge and techniques to create your own software. So, grab your keyboard, fire up Notepad, and let’s dive into the wonderful world of programming!

X

This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

This article has been viewed 28,102 times.

This wikiHow teaches you how to use your Windows computer’s Notepad text editor to write programs. To proceed, you need to enter the program’s code into Notepad line by line and then save the file in the appropriate programming language format.

Table of Contents

  • Steps
    • Some general advice
    • Create a program
    • Create a basic BAT program
    • Create a basic HTML program
    • Creating a Basic Python Program
    • Creating Basic C++ Programs
  • Advice
  • Warning

Steps

Some general advice

Image titled Understandthis

Image titled Understandthis

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/e/e5/Understandthis.jpg/v4-728px-Understandthis.jpg”,”bigUrl”:”https://www.wikihow. com/images/thumb/e/e5/Understandthis.jpg/v4-728px-Understandthis.jpg”,”smallWidth”:460,”smallHeight”:259,”bigWidth”:728,”bigHeight”:410,”licensing” :”<div class=”mw-parser-output”></div>”}
Understand the limitations of Notepad. Technically, we can write and launch a program in Notepad using any available programming language, but for the program to run, the file must be saved in the correct format.

  • By default, all Notepad files will be saved as text documents.
Image titled Make a Program Using Notepad Step 2

Image titled Make a Program Using Notepad Step 2

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/47/Make-a-Program-Using-Notepad-Step-2.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/47/Make-a-Program-Using-Notepad-Step-2.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Find and open Notepad. The easiest way to open Notepad is to click Start

Windows Start

{“smallUrl”:”https://www.wikihow.com/images_en/0/07/Windowsstart.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/07/ Windowsstart.png/30px-Windowsstart.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}

, type notepad , and then select the Notepad icon at the top of the Start window.

Image titled Programlanguage

Image titled Programlanguage

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/2/2e/Programlanguage.jpg/v4-728px-Programlanguage.jpg”,”bigUrl”:”https://www.wikihow. com/images/thumb/2/2e/Programlanguage.jpg/v4-728px-Programlanguage.jpg”,”smallWidth”:460,”smallHeight”:259,”bigWidth”:728,”bigHeight”:410,”licensing” :”<div class=”mw-parser-output”></div>”}
Define programming language. Notepad doesn’t restrict any languages, but you need to use one language throughout the document to maintain consistency.

  • If you don’t know anything about programming languages, you can try one of the examples in this article.
Image titled Make a Program Using Notepad Step 4

Image titled Make a Program Using Notepad Step 4

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/ce/Make-a-Program-Using-Notepad-Step-4.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/ce/Make-a-Program-Using-Notepad-Step-4.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-4.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Press ↵ Enter after you complete the line of code. Like most code editors, you need to add new lines of code to Notepad.
Image titled Make a Program Using Notepad Step 5

Image titled Make a Program Using Notepad Step 5

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/cf/Make-a-Program-Using-Notepad-Step-5.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-5.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/cf/Make-a-Program-Using-Notepad-Step-5.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-5.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Close any opening brackets. Every time you open a brace (such as { or [ ), you must close it with the same mark on the opposite side to complete the line of code and not cause an error.
Image titled Considerusing

Image titled Considerusing

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/9a/Considerusing.jpg/v4-728px-Considerusing.jpg”,”bigUrl”:”https://www.wikihow. com/images/thumb/9/9a/Considerusing.jpg/v4-728px-Considerusing.jpg”,”smallWidth”:460,”smallHeight”:259,”bigWidth”:728,”bigHeight”:410,”licensing” :”<div class=”mw-parser-output”></div>”}
Consider using a dedicated code editor. While you can write almost any program in Notepad, it’s not necessarily the easiest way. Because Notepad doesn’t have any text highlighting or indenting options, it can be a bit difficult to write large pieces of code.

  • Notepad++ is a great free option for programming.

Create a program

Image titled Make a Program Using Notepad Step 7

Image titled Make a Program Using Notepad Step 7

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/cc/Make-a-Program-Using-Notepad-Step-7.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-7.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/cc/Make-a-Program-Using-Notepad-Step-7.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-7.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Open Notepad. How to create and save the program will depend on the programming language you use.
Image titled Make a Program Using Notepad Step 8

Image titled Make a Program Using Notepad Step 8

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/b/b0/Make-a-Program-Using-Notepad-Step-8.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-8.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/b/b0/Make-a-Program-Using-Notepad-Step-8.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-8.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Enter the program code. You need to make sure that the language you are using is consistent throughout the document.
Image titled Make a Program Using Notepad Step 9

READ More:   How to Blanch the Sticky Beans

Image titled Make a Program Using Notepad Step 9

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/00/Make-a-Program-Using-Notepad-Step-9.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-9.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/00/Make-a-Program-Using-Notepad-Step-9.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-9.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Click File . This option is in the upper-left corner of the Notepad window. A drop-down menu will appear.
Image titled Make a Program Using Notepad Step 10

Image titled Make a Program Using Notepad Step 10

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/18/Make-a-Program-Using-Notepad-Step-10.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-10.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/18/Make-a-Program-Using-Notepad-Step-10.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-10.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Click Save As… . This option is near the top of the drop-down menu. The “Save” window will open.
Image titled Make a Program Using Notepad Step 11

Image titled Make a Program Using Notepad Step 11

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/1d/Make-a-Program-Using-Notepad-Step-11.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-11.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/1d/Make-a-Program-Using-Notepad-Step-11.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-11.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Select a save location. Click a folder (e.g. Desktop ) on the left side of the “Save” window to choose as the destination for the program.
Image titled Make a Program Using Notepad Step 12

Image titled Make a Program Using Notepad Step 12

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/6/6e/Make-a-Program-Using-Notepad-Step-12.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-12.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/6e/Make-a-Program-Using-Notepad-Step-12.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-12.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Click the “Save as type” box. This pane is near the bottom of the “Save” window. A menu will drop down.
Image titled Make a Program Using Notepad Step 13

Image titled Make a Program Using Notepad Step 13

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/3c/Make-a-Program-Using-Notepad-Step-13.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-13.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/3c/Make-a-Program-Using-Notepad-Step-13.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-13.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Click the All Files category in the drop-down menu. This option will allow you to save the Notepad file as any type of program.
Image titled Make a Program Using Notepad Step 14

Image titled Make a Program Using Notepad Step 14

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/6/65/Make-a-Program-Using-Notepad-Step-14.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-14.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/65/Make-a-Program-Using-Notepad-Step-14.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-14.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Enter a name for the program. Click in the “File name” data field and enter the name you want to give the program.
Image titled Make a Program Using Notepad Step 15

Image titled Make a Program Using Notepad Step 15

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/14/Make-a-Program-Using-Notepad-Step-15.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-15.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/14/Make-a-Program-Using-Notepad-Step-15.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-15.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add the program’s extension to the name. It doesn’t matter what the program name is, you still have to add a period and the programming language extension after the name to save the program properly. Popular programming languages with extensions include:

  • Batch (BAT) – .bat
  • HTML – .htm
  • Python – .py
  • C++ – .cpp
  • For example, to save a batch file with the name “duahau”, enter duahau.bat in the “File name” field.
Image titled Make a Program Using Notepad Step 16

Image titled Make a Program Using Notepad Step 16

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/7/79/Make-a-Program-Using-Notepad-Step-16.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-16.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/7/79/Make-a-Program-Using-Notepad-Step-16.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-16.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Click Save in the lower-right corner of the window. The program will be saved in the format you choose. You can launch it by double-clicking on the file, or sometimes you’ll need to select a program to open.

Create a basic BAT program

Image titled Make a Program Using Notepad Step 17

Image titled Make a Program Using Notepad Step 17

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/d2/Make-a-Program-Using-Notepad-Step-17.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-17.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/d2/Make-a-Program-Using-Notepad-Step-17.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-17.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Open Notepad. You can create a program that opens another program on your computer by using batch scripting (BAT).
Image titled Make a Program Using Notepad Step 18

Image titled Make a Program Using Notepad Step 18

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/37/Make-a-Program-Using-Notepad-Step-18.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-18.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/37/Make-a-Program-Using-Notepad-Step-18.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-18.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Enter the filename into the Command Prompt. Type cmd.exe into Notepad.
Image titled Make a Program Using Notepad Step 19

Image titled Make a Program Using Notepad Step 19

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/c6/Make-a-Program-Using-Notepad-Step-19.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-19.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/c6/Make-a-Program-Using-Notepad-Step-19.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-19.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Save the program . You need to make sure you use the .bat extension when you save the program.
Image titled Make a Program Using Notepad Step 20

Image titled Make a Program Using Notepad Step 20

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/6/6d/Make-a-Program-Using-Notepad-Step-20.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-20.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/6d/Make-a-Program-Using-Notepad-Step-20.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-20.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Double-click the BAT file. A new Command Prompt window will open.

Create a basic HTML program

Image titled Make a Program Using Notepad Step 21

Image titled Make a Program Using Notepad Step 21

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/b/b2/Make-a-Program-Using-Notepad-Step-21.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-21.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/b/b2/Make-a-Program-Using-Notepad-Step-21.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-21.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Open Notepad. Especially, if you are designing websites then HTML is a great language to use.
Image titled Make a Program Using Notepad Step 22

Image titled Make a Program Using Notepad Step 22

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/6/61/Make-a-Program-Using-Notepad-Step-22.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-22.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/61/Make-a-Program-Using-Notepad-Step-22.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-22.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Specify that you will use HTML. Type <!DOCTYPE html> into Notepad and press ↵ Enter .
Image titled Make a Program Using Notepad Step 23

Image titled Make a Program Using Notepad Step 23

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/a/ac/Make-a-Program-Using-Notepad-Step-23.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-23.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/a/ac/Make-a-Program-Using-Notepad-Step-23.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-23.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add HTML tags. You type <html> into Notepad and then press ↵ Enter .
Image titled Make a Program Using Notepad Step 24

Image titled Make a Program Using Notepad Step 24

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/3d/Make-a-Program-Using-Notepad-Step-24.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-24.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/3d/Make-a-Program-Using-Notepad-Step-24.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-24.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Set up body text. Type <body> into Notepad and then press ↵ Enter . This line specifies that the next section of the document will contain information (in this example, text).
Image titled Make a Program Using Notepad Step 25

Image titled Make a Program Using Notepad Step 25

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/4c/Make-a-Program-Using-Notepad-Step-25.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-25.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/4c/Make-a-Program-Using-Notepad-Step-25.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-25.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add a page title. Type <h1>Text</h1> into Notepad and press ↵ Enter , remembering to replace “Text” with what you want the page title to be.

  • For example, to create a page with the title “Hello!”, you would type <h1>Xin chao!</h1> into Notepad.
Image titled Make a Program Using Notepad Step 26

Image titled Make a Program Using Notepad Step 26

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/7/7e/Make-a-Program-Using-Notepad-Step-26.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-26.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/7/7e/Make-a-Program-Using-Notepad-Step-26.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-26.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add text to the page. Type <p>text</p> into Notepad and then press ↵ Enter . Don’t forget to replace “text” with your own text.

  • For example, when you type <p>Hom nay ban khoe khong?</p> into Notepad, the sentence “How were you today?” will appear below the title.
READ More:   How to Be a Good Kisser
Image titled Make a Program Using Notepad Step 27

Image titled Make a Program Using Notepad Step 27

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/8/8d/Make-a-Program-Using-Notepad-Step-27.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-27.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/8/8d/Make-a-Program-Using-Notepad-Step-27.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-27.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Close the content section. Type </body> into Notepad, then press ↵ Enter .
Image titled Make a Program Using Notepad Step 28

Image titled Make a Program Using Notepad Step 28

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/92/Make-a-Program-Using-Notepad-Step-28.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-28.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/92/Make-a-Program-Using-Notepad-Step-28.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-28.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Specify the end of the HTML code. You enter </html> into Notepad.
Image titled Make a Program Using Notepad Step 29

Image titled Make a Program Using Notepad Step 29

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/f/f3/Make-a-Program-Using-Notepad-Step-29.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-29.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/f/f3/Make-a-Program-Using-Notepad-Step-29.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-29.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Review the program’s code. The code will look similar to this:

  • <!DOCTYPE html>
  • <html>
  • <body>
  • <h1>Xin chao!</h1>
  • <p>Hom nay ban khoe khong?</p>
  • </body>
  • </html>
Image titled Make a Program Using Notepad Step 30

Image titled Make a Program Using Notepad Step 30

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/31/Make-a-Program-Using-Notepad-Step-30.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-30.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/3/31/Make-a-Program-Using-Notepad-Step-30.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-30.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Save the program . You need to make sure you use the .htm extension when saving.
Image titled Make a Program Using Notepad Step 31

Image titled Make a Program Using Notepad Step 31

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/f/f7/Make-a-Program-Using-Notepad-Step-31.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-31.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/f/f7/Make-a-Program-Using-Notepad-Step-31.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-31.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Double-click the HTML file. This usually opens the program in the default web browser, or sometimes you need to select the program first. The title and body text will appear.

Creating a Basic Python Program

Image titled Make a Program Using Notepad Step 32

Image titled Make a Program Using Notepad Step 32

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/5/5e/Make-a-Program-Using-Notepad-Step-32.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-32.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/5/5e/Make-a-Program-Using-Notepad-Step-32.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-32.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Open Notepad. By using the “print” command on Python, any text can be displayed.
Image titled Make a Program Using Notepad Step 33

Image titled Make a Program Using Notepad Step 33

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/e/ea/Make-a-Program-Using-Notepad-Step-33.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-33.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/e/ea/Make-a-Program-Using-Notepad-Step-33.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-33.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Enter the command “print”. Type print(" into Notepad. Make sure there are no spaces.
Image titled Make a Program Using Notepad Step 34

Image titled Make a Program Using Notepad Step 34

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/42/Make-a-Program-Using-Notepad-Step-34.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-34.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/4/42/Make-a-Program-Using-Notepad-Step-34.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-34.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add display text. Please enter Hello! into Notepad.
Image titled Make a Program Using Notepad Step 35

Image titled Make a Program Using Notepad Step 35

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/c/c8/Make-a-Program-Using-Notepad-Step-35.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-35.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/c/c8/Make-a-Program-Using-Notepad-Step-35.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-35.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Close the “print” command. Type ") into Notepad to close the command.
Image titled Make a Program Using Notepad Step 36

Image titled Make a Program Using Notepad Step 36

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/d7/Make-a-Program-Using-Notepad-Step-36.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-36.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/d/d7/Make-a-Program-Using-Notepad-Step-36.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-36.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Review your code. The code will look similar to this:

  • print("Xin chao!")
Image titled Make a Program Using Notepad Step 37

Image titled Make a Program Using Notepad Step 37

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/2/23/Make-a-Program-Using-Notepad-Step-37.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-37.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/2/23/Make-a-Program-Using-Notepad-Step-37.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-37.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Save the program . Make sure you use the .py extension. You should now be able to open the program with your usual Python editor.

Creating Basic C++ Programs

Image titled Make a Program Using Notepad Step 38

Image titled Make a Program Using Notepad Step 38

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/6/6f/Make-a-Program-Using-Notepad-Step-38.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-38.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/6f/Make-a-Program-Using-Notepad-Step-38.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-38.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Open Notepad. We’ll use Notepad to create a basic C++ program that displays the text “Hello everyone!” at launch.
Image titled Make a Program Using Notepad Step 39

Image titled Make a Program Using Notepad Step 39

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/19/Make-a-Program-Using-Notepad-Step-39.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-39.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/19/Make-a-Program-Using-Notepad-Step-39.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-39.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add a title to the program. Enter // along with the title of the program (eg “Program 1”). Anything entered on the same line followed by two slashes will also display as plain text, but this is not part of the program.

  • For example, to set the title “Program 1” for the program, you type //Chuong trinh 1 into Notepad.
Image titled Make a Program Using Notepad Step 40

Image titled Make a Program Using Notepad Step 40

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/b/b0/Make-a-Program-Using-Notepad-Step-40.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-40.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/b/b0/Make-a-Program-Using-Notepad-Step-40.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-40.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Enter the preprocessor command. Type # include <iostream> into Notepad and press ↵ Enter . This command instructs C++ to launch the next lines of code as a program.
Image titled Make a Program Using Notepad Step 41

Image titled Make a Program Using Notepad Step 41

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/0c/Make-a-Program-Using-Notepad-Step-41.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-41.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/0c/Make-a-Program-Using-Notepad-Step-41.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-41.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Declare the function of the program. Type int main () into Notepad, then press ↵ Enter .
Image titled Make a Program Using Notepad Step 42

Image titled Make a Program Using Notepad Step 42

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/06/Make-a-Program-Using-Notepad-Step-42.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-42.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/06/Make-a-Program-Using-Notepad-Step-42.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-42.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add opening parenthesis. You need to type { in Notepad and then press ↵ Enter . The main code of the program will be between this opening parenthesis and the following closing parenthesis.
Image titled Make a Program Using Notepad Step 43

Image titled Make a Program Using Notepad Step 43

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/97/Make-a-Program-Using-Notepad-Step-43.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-43.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/9/97/Make-a-Program-Using-Notepad-Step-43.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-43.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Enter the program’s executable code. Please enter std::cout << "Xin chao moi nguoi!"; into Notepad, then press ↵ Enter .
Image titled Make a Program Using Notepad Step 44

Image titled Make a Program Using Notepad Step 44

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/b/b4/Make-a-Program-Using-Notepad-Step-44.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-44.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/b/b4/Make-a-Program-Using-Notepad-Step-44.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-44.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Add closing brackets. You need to type } into Notepad to end the program’s execution phase.
Image titled Make a Program Using Notepad Step 45

Image titled Make a Program Using Notepad Step 45

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/1/1c/Make-a-Program-Using-Notepad-Step-45.jpg/v4-728px-Make-a-Program- Using-Notepad-Step-45.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/1/1c/Make-a-Program-Using-Notepad-Step-45.jpg/ v4-728px-Make-a-Program-Using-Notepad-Step-45.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:” <div class=”mw-parser-output”></div>”}
Review the program. The code will look similar to this:

  • //Chuong trinh 1
  • #include <iostream>
  • int main ()
  • {
  • std::cout << "Xin chao moi nguoi!"; }
  • std::cout << "Xin chao moi nguoi!"; }
  • Lưu chương trình . Hãy chắc chắn rằng bạn sử dụng phần mở rộng .cpp khi lưu. Sau khi lưu tập tin, bạn sẽ có thể khởi chạy chương trình bằng trình biên dịch C++ yêu thích. Image titled Make a Program Using Notepad Step 46Image titled Make a Program Using Notepad Step 46{"smallUrl":"https://www.wikihow.com/images_en/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","bigUrl":"https://www.wikihow.com/images/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"<div class="mw-parser-output"></div>"}
    Lưu chương trình . Hãy chắc chắn rằng bạn sử dụng phần mở rộng .cpp khi lưu. Sau khi lưu tập tin, bạn sẽ có thể khởi chạy chương trình bằng trình biên dịch C++ yêu thích. Image titled Make a Program Using Notepad Step 46Image titled Make a Program Using Notepad Step 46{"smallUrl":"https://www.wikihow.com/images_en/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","bigUrl":"https://www.wikihow.com/images/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"<div class="mw-parser-output"></div>"}

    READ More:   How to Eat Muesli

    Lưu chương trình . Hãy chắc chắn rằng bạn sử dụng phần mở rộng .cpp khi lưu. Sau khi lưu tập tin, bạn sẽ có thể khởi chạy chương trình bằng trình biên dịch C++ yêu thích. Image titled Make a Program Using Notepad Step 46Image titled Make a Program Using Notepad Step 46{"smallUrl":"https://www.wikihow.com/images_en/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","bigUrl":"https://www.wikihow.com/images/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"<div class="mw-parser-output"></div>"}

    Lưu chương trình . Hãy chắc chắn rằng bạn sử dụng phần mở rộng .cpp khi lưu. Sau khi lưu tập tin, bạn sẽ có thể khởi chạy chương trình bằng trình biên dịch C++ yêu thích. Image titled Make a Program Using Notepad Step 46Image titled Make a Program Using Notepad Step 46 {"smallUrl":"https://www.wikihow.com/images_en/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","bigUrl":"https://www.wikihow.com/images/thumb/a/ae/Make-a-Program-Using-Notepad-Step-46.jpg/v4-728px-Make-a-Program-Using-Notepad-Step-46.jpg","smallWidth":460,"smallHeight":345,"bigWidth":728,"bigHeight":546,"licensing":"<div class="mw-parser-output"></div>"}
  • Advice

    • C++ and HTML are the two most commonly used programming languages.
    • You can use any programming language to write most programs, however some languages may be better suited for specific features (for example, HTML is ideal for creating webpage).

    Warning

    • Always test your code before saving. If you save a corrupted program, it may cause the default assembler to fail.
    X

    This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

    The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

    This article has been viewed 28,102 times.

    This wikiHow teaches you how to use your Windows computer’s Notepad text editor to write programs. To proceed, you need to enter the program’s code into Notepad line by line and then save the file in the appropriate programming language format.

    In conclusion, writing programs in Notepad can be a simple and accessible way for beginners to get started in programming. While Notepad may lack some of the advanced features of more specialized programming environments, it offers a basic and intuitive platform for creating and testing code. By following the recommended steps, such as ensuring the correct file extension, saving and running the code properly, and utilizing the command prompt or integrated development environments, users can successfully write programs in Notepad. The key is to focus on understanding the fundamental concepts of programming, as Notepad serves as a uncomplicated tool to bring these concepts to life. With practice and dedication, aspiring programmers can become proficient in writing programs in Notepad before transitioning to more advanced and feature-rich programming environments.

    Thank you for reading this post How to Write Programs in Notepad at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.

    Related Search:

    1. “Step-by-step guide to writing programs in Notepad”
    2. “Beginner’s tutorial for programming in Notepad”
    3. “Notepad programming basics”
    4. “Creating a simple program in Notepad”
    5. “Tips for writing efficient programs in Notepad”
    6. “Debugging techniques for programs written in Notepad”
    7. “Notepad programming best practices”
    8. “How to compile and run programs in Notepad”
    9. “Advanced Notepad programming techniques”
    10. “Resources and online communities for Notepad programming”

    Related Posts

    How to Create Curved Text in Photoshop
    How to fall asleep faster
    How to Install FBReader to Read eBooks

    Category: How To

    Previous Post: « Top 999+ miss you mom images – Amazing Collection miss you mom images Full 4K
    Next Post: Top 999+ Alyssa Milano Wallpaper Full HD, 4K✅Free to Use »

    Copyright © 2025 · Tnhelearning.edu.vn - Useful Knowledge