calculating using variables java
Questions/Tutorials for any programming language not covered in other sections.
1 post
Page 1 of 1
hey guys
this small snippet will help you understand how to calculate using variables ok now
proof
![Image]()
you can also use multiply and divide etc instead of addition :ugeek: now you can do calculations using variables in java cooll;
this small snippet will help you understand how to calculate using variables ok now
Code: Select all
integer x value is equal to 11 and integer y value is equal to 100 and z value is x and y that mean z will get the total of x and y class variables
{
public static void main(String args[])
{
int x=11;
int y=100;
int z;
z = x+y;
System.out.println("The Answer Is : " + z);
}
}
proof

you can also use multiply and divide etc instead of addition :ugeek: now you can do calculations using variables in java cooll;
Find my programs on Softpedia
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023