Running Your Code and Seeing the Result

Running Your Code and Seeing the Result

Lesson Details:
July 10, 2020


I: Introduction

II: Body

III: Conclusion

A.1 What is a programming language?

A.2 Benefits of programming languages

A.3 Types of programming languages

A.4 Basic concepts of programming languages

A.5 Programming languages and the future

Bibliography

I: Introduction

Everyone who has ever used a computer or smartphone, has used a programming language in some way. Programming languages allow computers to do what we want them to do in a certain way and order. The programming language in which we write the code that the program will understand is called the source code. Source code is written in English or another language that humans can understand, and then translated into machine code (or binary) that the computer understands. So as you see, computers can read only one language – binary. A popular programming language is C++, which is used for all sorts of things, such as building complex programs and games. It is important to know how to code in these languages because they are everywhere, and knowing how to work with them is very useful and beneficial. We will now take a look at each of the steps: creating a program and running it. You will be able to create your own programs and run them, and you will finally understand the benefits of using these types of languages.

II: Body

A. Running your code and seeing the result

Code is just plain text, so if you have your computer connect to the internet, you can simply type your code into a website and run it on their server – this is what we will do with our simple example. To begin, we need to open up a text editor – this is a specialized type of program used for writing and editing code. Namely, we will use Notepad++ – an open-source text editor for Windows. After you have opened it up, you should see something like this:

































































Now, let’s fill it out:



























































The first line reads: #include // include iostream library header file

The second line reads: int main() { // declare main function

The third line reads: std::cout<<"Hello World!"<

loader
Course content