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

  • 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.

主站蜘蛛池模板: 中西区| 独山县| 磐石市| 连江县| 肥城市| 宁陵县| 巴东县| 定远县| 志丹县| 西充县| 贞丰县| 临沧市| 星子县| 宜阳县| 本溪| 绍兴县| 锡林浩特市| 三原县| 安溪县| 伊宁市| 古丈县| 黔东| 泰来县| 枣庄市| 台江县| 大英县| 区。| 股票| 张家口市| 荣成市| 江西省| 明水县| 太谷县| 和龙市| 乌兰浩特市| 集贤县| 喀喇沁旗| 博爱县| 同江市| 东阿县| 西宁市|