Thursday, 20 August 2020

JAVA PROGRAMMING FOR ADDING UP NUMBERS -:

ADDITION OF NUMBERS 

IN JAVA 

  • ELEMENTS OF JAVA USED IN PROGRAMMING -:

  • int      ---> This command  helps you to specify that the value that is assigned to     a particular variable in the specific  program is an INTEGER.
  •  System.out.println()---->This command helps you to print i.e print the result in the console as specified by you.
  •  [ ; ] ----> This particular ( symbol enclosed in square brackets ) i.e semicolon in java represents that a particular statement written by you is complete.     

       NOTE-:
  1. CASE of letter must not be ignored
  2.  After end of every statement remember to close it with semicolon sign i.e ;
  3. None of the special characters should be ignored. 

        

  • PROGRAMMING -:
     package learning;

     public class AditionForBlog {

public static void main(String[] args) {
int a = 3;
int b = 4;
int c = 6;
int sum = a+b+c ;
System.out.println(sum);

}

}
 

NOTE -: Here you can add as many integers as possible. 
  • PROGRAMMING IMAGE-:

  • OUTPUT IMAGE (IN CONSOLE)-:


THANK YOU😌
FOR VISITING
PLEASE  DO FOLLOW OUR PAGE👦






No comments:

Post a Comment

Popular