Getting Started with Programming

(1) Start by saying hi to the world through a computer

To get your computer to do something, first you have to tell it to communicate with it. But computers are different from humans. They don’t understand the language of the human world, so you have to tell them through the language it recognizes that this language is a computer language (such as C, PHP, C#, C++, etc.). You write a statement in these computer languages ​​for the computer to execute, and these statements are the source code. But in fact, the code written in the above language cannot be directly recognized by the computer, because the computer is very stupid and can only recognize the binary language; then, wouldn't it be good if we directly write 0101100000111000 to the computer? not good at all! It's too long and cumbersome, and I can't remember it. Converting a short sentence into binary may be a big article. If you want to write a program, when will it be coded? Therefore, there is an urgent need for something to translate the computer language we use (C and C++, which are just examples, are high-level languages), and the compiler came into being. So the development process is actually very simple. First, you need to write a piece of source code in a computer language (code); then translate it to the computer through a compiler (compile); and finally execute it (run).

(2)hello,world

To make the computer output hello, World, you can write a piece of code in Notepad, and then find the compiler, compile and run, but this is very troublesome, and it takes a long time to find the location of the compiler csc.exe. At this time, you need a development tool (IDE), and Visual Studio is worth having.

Open Visual Studio, choose File--New--Project--C#-Console Application.

Then enter Console.Write("hello,world")

Then Ctrl+F5 is OK.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325118730&siteId=291194637