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-:
- CASE of letter must not be ignored.
- After end of every statement remember to close it with semicolon sign i.e ;
- 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-:
THANK YOU😌FOR VISITING
PLEASE DO FOLLOW OUR PAGE👦
- PROGRAMMING IMAGE-:
PLEASE DO FOLLOW OUR PAGE👦
No comments:
Post a Comment