What is integer variable?

  • The variable declared by using percent sign (%) as the last character of the variable name is integer variable. 
  • The declaration of a variable as an integer causes the variable's value to be rounded to the closest integer, i.e. whole number if the value is not already an integer.
  • For example:
    • if variable A = 15.5, its value in the entire program will be 15.5, but if it is declared as A% = 15.5, then the value of the variable will be 16.

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.