WHAT IS A VARIABLE

in programming, a variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instruction s that tell the computer what to do and data that the program uses when it is running.

Let me give you an analogy. You can thing of a variable as a BOX. You can put things in a box so that when you need them you can access the BOX. You can have different boxes to store similar things or items.

Why use a variable. You are a great lover. You write letters to your mates. Today you have MARY , JANE AND MARGRET as your mates. You write hundreds of letters to each one of them. But you lose these 3 mates. But remember you are a great lover. You find ten more mates!! But alas now you need to write them letters. Well if you used a variable for the name in each letter. Example instead of the name use a variable called NAME. You tell the letter every where I placed NAME make it for example MARY. Now when you change lose MARY or add another mate. – You tell the letter to replace the NAME with the name of the new MATE.

Most programming languages have different types of variables. Examples of these are STRING, CHARACTER BOOLEAN NUMBER LONG NUMBER ETC.

STRING

Most programming languages have a data type called a string, which is used for data values that are made up of ordered sequences of characters, such as "hello world". A string can contain any sequence of characters, visible or invisible, and characters may be repeated.

BOOLEAN

A Boolean variable has only two possible values: true or false. ... In this example, when the boolean value "x" is true, vertical black lines are drawn and when the boolean value "x" is false, horizontal gray lines are drawn.

CHARACTER

CHARACTER A character is any letter, number, space, punctuation mark, or symbol that can be typed on a computer. The word "computer," for example, consists of eight characters.

NUMERIC DATA TYPES

An integer is a numeric value without a decimal. Integers are whole numbers and can be positive or negative. Sometimes a distinction is made between short and long integers, referring to how much data storage is used for the number. A short integer is typically stored using 16 bits, which means you can store up to 2^16, or 65,536, unique values. For any number larger than that, you would need to use a long integer, which uses 32 bits or more. A number with a decimal is referred to as a decimal, a float or a double. The terminology varies somewhat with the programming language being used. The term 'float' comes from floating point, which means you can control where the decimal point is located. The term 'double' refers to using double the amount of storage relative to a float. Working with numbers in code is a little bit like using a calculator. Here is an example of how numeric values are used in code, in this case using a multiplication character:

C#

C# - Data Types. C# is a strongly-typed language. It means we must declare the type of a variable that indicates the kind of values it is going to store, such as integer, float, decimal, text, etc. ... Value types include simple types (such as int, float, bool, and char), enum types, struct types, and Nullable value types. string stringVar = "Hello World!!"; int intVar = 100; float floatVar = 10.2f; char charVar = 'A'; bool boolVar = true;

string stringVar =Hello World!

int intVar = 100;

float floatVar= 10.2f; 10.2f;

char charVar ='A'

bool boolVar =true

I would like to personally thank you for your outstanding product. You guys rock! It's all good. I can't say enough about Roar Cycles."

- Tammara I.

"Roar Cycles is the most valuable business resource we have EVER purchased. I will let my mum know about this, she could really make use of Roar Cycles! Roar Cycles has completely surpassed our expectations."

- Floros V.

I'm good to go. Roar Cycles is both attractive and highly adaptable. I will refer everyone I know."

- Carlin B.

Roar Cycles impressed me on multiple levels. I would gladly pay over 600 dollars for Roar Cycles. We can't understand how we've been living without Roar Cycles."

- James H.

bike repair