java Addition, sub, div example

				
					class p4
{
	public static void main(String ag[])
	{
		int a=10;
		int b=20;
		System.out.println("a="+ a);
		System.out.println("b="+b);

		int c =a+b;
		System.out.println("c=(a+b)="+c);
		c=b-a;
		System.out.println("c=(b-a)="+c);
		c=a*b;
		System.out.println("c=(a*b)="+c);
	}
}
				
			
java Addition

Out put

				
					a=10
b=20
c=(a+b)=30
c=(b-a)=10
c=(a*b)=200
				
			

1. **Addition**: Addition is an arithmetic operation that combines two or more numbers to find their total sum. It’s like putting together pieces to form a whole. For example, if you have 2 apples and someone gives you 3 more, you can add them together to find that you now have 5 apples in total. In mathematical notation, addition is typically represented by the “+” symbol.

2. **Subtraction**: Subtraction is the inverse operation of addition. It involves taking away or removing one quantity from another to find the difference between them. It’s like breaking a whole into smaller parts. For instance, if you have 5 apples and you eat 2, you can subtract 2 from 5 to find that you now have 3 apples left. In mathematical notation, subtraction is represented by the “-” symbol.

3. **Division**: Division is an operation used to split a quantity into equal parts or groups. It’s essentially the process of sharing or distributing items fairly. For example, if you have 10 candies and you want to share them equally among 5 friends, you can perform division to find that each friend gets 2 candies. In mathematical notation, division is represented by the “÷” symbol or using a fraction bar.

These operations are fundamental in mathematics and are used in various real-life situations to solve problems involving quantities, measurements, and comparisons. They form the basis of arithmetic and are essential for building more advanced mathematical concepts and techniques.

 
 
 
 
 
 
Scroll to Top