It is the most popular programming language in the world today. JavaScript is the web scripting language developed by Netscape.Javascript is the programming language of the web.console.log operation will display the value of fact.After that, we will multiply the loop counter i with fact and will store the result in fact.Then we require way to loop from 1 to the number to multiply the number repeatedly.let fact = 1 Here we are first initialising fact variable by 1.For Example: Factorial of 5 is : 5 * 4 * 3 * 2 * 1 = 120Įnter fullscreen mode Exit fullscreen mode.To find the factorial of a number we have to repeatedly multiply the numbers from 1 to the given number.So, here's a program to find a factorial of a number.įor those who don't know what is a factorial of a number. So, I don't know how to write Machine Code but the closet language I know to Machine is the Assembly Langauge 8086µ (learned in my College). Here, they are more Memory efficient.Įxamples of Lower Level Programming Languages: On the other hand, Machine can easily understand the lower level languages in comparison of Programmers. As well as they Memory efficiency is less.Įxamples of Higher Level Programming Languages: Higher level languages can be easily understood or interpreted or compiled by us (Programmers) in comparison to the machine. What are Higher and Lower Level Programming Languages ? Then the program will be easier to understand and update.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |