How To Write A Program In Notepad

Table of contents:

How To Write A Program In Notepad
How To Write A Program In Notepad

Video: How To Write A Program In Notepad

Video: How To Write A Program In Notepad
Video: Write u0026 run C programs in notepad+ 2024, November
Anonim

Notepad is a simple text editor. It is used to scan documents in.txt format. You can launch Notepad by clicking "Start". Select "Programs" and "Accessories". It can print text, create web pages and even small viruses. Has anyone thought that a good program can be created in a simple notepad?

How to write a program in notepad
How to write a program in notepad

It is necessary

Personal computer set notepad

Instructions

Step 1

To create a program, you need to launch Notepad. Then enter the required data, write the required text. It will depend on what you want to create. If this document becomes a website page, fill in everything in the html editor.

Step 2

Enter, for example, mspaint. Save the document under any name. Click "File" and "Save As …" You just need to choose the right format. In the "File name" write the name, and instead of.txt, insert the format you need (html, for our case.bat.) Open the created file. It can now write anything you want. Instead of "mspaint" Taskmgr-task manager and so on, that is, it all depends on what program you want to create.

Step 3

In Notepad, plain text can become a program if you choose the right format for it. Open notepad and write the following program code:

dim a, b, c

a = inputbox (“Enter time for timer”)

c = inputbox (“Enter a message for the timer”)

msgbox "Timer is running"

b = a * 1000 * 60

wscript.sleep b

msgbox c.

Save your document in.vbs format. That's it, you can run your program.

Step 4

Having written the text for the program, the most important thing is to save it in the correct format, or extension. Open Notepad. Enter the following program text:

echo off

title calculator

: start

cls

set expr = "0"

set / a answer = 0

set / p expr = "Enter expression:"

set / a answer =% expr%

echo Answer:% answer%

pause

goto start

Step 5

Save this file in the.bat or.cmd extension. You can enter the word "help" on the command line. There you will see the commands available. For the syntax, enter “help /?” On the line. If an extension is not available, open a command prompt and use a command such as [type con]. To save the text in the console, press the following combination: “Enter and Ctr + Z”. So notepad can also create programs, albeit not so huge and complex. Usually, programs with the extension *.bat *.cmd, *.vbs are saved in Notepad.

Recommended: