Difference between perfect square and a number that can be expressed as product of consecutive integers:

Image
A perfect square is a number that can be expressed as the product of an integer by itself or as the second exponent of an integer¹. For example, 1, 4, 9, and 16 are perfect squares because they are the squares of 1, 2, 3, and 4 respectively. A perfect square can also be written as x^2, where x is an integer. A number that can be expressed as a product of consecutive integers is a number that can be obtained by multiplying two or more integers that follow each other in order. For example, 6, 24, and 120 are numbers that can be expressed as products of consecutive integers because they are equal to 2 x 3, 2 x 3 x 4, and 2 x 3 x 4 x 5 respectively. A number that can be expressed as a product of consecutive integers can also be written as x(x + 1)(x + 2)...(x + n), where x and n are integers. The difference between a perfect square and a number that can be expressed as a product of consecutive integers is that a perfect square has only one factor pair that consists of the same integer, whi

What is a computer language

 



Computer language :

A computer language is a way of telling a computer what to do. As we human understand different languages and communicate with one another similarly we also have to communicate with computer and tell  it to do some thing, so for this purpose we need a language that computer can understand because computer is not able to understand the general human languages we speak. 

 A computer language has a set of rules, words, symbols, and numbers that are used to write instructions for a computer. These instructions are called programs or software. The computer use these instruction and programs and perform the required task for the user. Different computer languages have different purposes and features.

Types of computer languages :

1: Low level language
2: High level language

Low level language:

 Low-level languages are closer to the way computers work, using binary numbers (0 and 1) or symbols (called mnemonics) to represent the basic operations of the computer.

Examples:
   Machine language is the most basic form of computer language, using only 0 and 1 to represent the instructions


High level language :

High-level languages are closer to the way humans think, using words and commands that are similar to natural languages like English.

Examples: 

Some examples of high-level languages are C, Java, Python, and SQL etc. High-level languages use words and commands to give an instruction to the computer that are more understandable and expressive for humans but these word and instruction are not understandable for the computer therefor compiler convert these instruction into binary language and then they are transfer to the computer.



Comments

Popular posts from this blog

CP Open ended Lab:

C language program to find prime number