官术网_书友最值得收藏!

  • Learn C# in 7 days
  • Gaurav Aroraa
  • 431字
  • 2021-07-08 09:51:18

What is programming?

There might be various definitions or various thoughts to define the word programming. In my view, programming is writing a solution in such a way that a machine (computer) can understand to depict the solution, which you can identify manually.

For example, let’s say you have a problem statement: find the total count of vowels from this book. If you want to find the solution to this statement, what will you do?

The probable steps for the solution to this problem are as follows:

  1. First, get the right book. I am assuming that you know the vowels (a, e, i, o, and u).
  1. How many vowels did you find in a book?--0 (zero).
  2. Open the current page (initially, our current page is 1) and start reading to find vowels.
  3. If the letter matches a, e, i, o, or u (please note that the case doesn’t matter, so the letters might as well be A, E, I, O, and U), then increase the vowel count by one.
  4. Is the current page completed?
  5. If the answer of step 5 is yes, then check if this is the last page of the book:

    • If yes, then we have the total vowel count in hand, which is nothing but n, where n is the total number of vowels found in the current chapter. Move to step 8 for the result.
    • If this is not the last chapter, move to the next chapter by adding 1 to the current chapter number. So, we should move to 1 + 1 = 2 (Chapter 2).
  6. In the next chapter, repeat steps 4 to 6 and until you reach the last chapter of the book.
  7. Finally, we have the total vowel count, that is, n (n is the total number of vowels found).

The preceding steps just described how we reached a perfect solution for our problem statement. These steps showed how we manually found the answer to our problem of counting all the vowels in the book's chapters.

In the programming world, such steps are collectively known as an algorithm.

An algorithm is nothing but a process to solve a problem by defining a set of rules.

When we write the preceding step(s)/algorithm in such a way that a machine/computer will be able to follow the instructions, it is called programming. These instructions should be written in a language understood by the machine/computer, and this is what is called a programming language.

In this book, we will use C# 7.0 as the programming language and .NET Core as the framework.

主站蜘蛛池模板: 南召县| 孝义市| 丁青县| 元朗区| 仙桃市| 卫辉市| 辽中县| 百色市| 安徽省| 赞皇县| 鹤岗市| 丹寨县| 彩票| 岳阳市| 宜川县| 盘山县| 鹿邑县| 商南县| 金塔县| 青河县| 宜兰县| 壶关县| 区。| 临洮县| 阳山县| 邵东县| 浦县| 老河口市| 和平县| 黑河市| 海安县| 晋城| 商南县| 云浮市| 长宁区| 平顺县| 弥渡县| 鲜城| 曲沃县| 广安市| 林州市|