0% found this document useful (0 votes)
8 views1 page

Arithmetic

Uploaded by

syediliyas8282
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Arithmetic

Uploaded by

syediliyas8282
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Name: Rehan Pathan

Practical No:1(B)

Aim :Program on Arithmetic Promotion

public class ArithmeticOperatorsExample {


public static void main(String[] args) {
int a = 10;
int b = 3;

int sum = a + b; // Addition


int difference = a - b; // Subtraction
int product = a * b; // Multiplication
int quotient = a / b; // Division
int remainder = a % b; // Modulus

System.out.println("Sum: " + sum);


System.out.println("Difference: " + difference);
System.out.println("Product: " + product);
System.out.println("Quotient: " + quotient);
System.out.println("Remainder: " + remainder);
}
}

You might also like