answersLogoWhite

0

public static void main(String[] args) {

int a = 5;

int b = 10;

int c;

c = a + b; // addition

c = a - b; // subtraction

c = a * b; // multiplication

c = a / b; // division

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Write a program in C for arithmetic operations between two integers your program should guide users with proper message or menu on the console?

Write a program in C for showing working of different logical operator in C.Your program should guide users with proper message/menu on the console. (5 Marks)


What is an arithmetic operator in c program?

An arithmetic operator is any of the "atomic" operators to do the following math operations: + addition - subtraction / division * multiplication % modulus division


What are the primary arithmetic operations a computer program can perform?

The four primary arithmetic operations a computer program can perform are addition, subtraction, multiplication and division.2 + 3 = 5 is an example of addition9 - 7 = 7 is an example of subtraction2 x 3 = 6 is an example of multiplication10 / 2 = 5 is an example of division


Writes a c program to find the sum of all integers between 1 and n?

Write a program to find the number and sum of all integers from 100 to 300 that are divisible by 11


How do you write a program to performs all airthematic operation between two matrixs using array?

To write a program that performs arithmetic operations between two matrices using arrays, first define two 2D arrays to represent the matrices. Then, create functions for each arithmetic operation (addition, subtraction, multiplication, etc.) that iterate through the elements of the matrices, performing the operation element-wise. Ensure to handle cases where the matrices have different dimensions, as this would affect the validity of the operations. Finally, print the result matrix after each operation.


Difference between a counter and a register?

A register can hold data, and it can be used for temporary storage or, in the case of an accumulator, it can participate in arithmetic or logical operations. A counter is a special case of a register. Usually, it can only be loaded, stored, or incremented, or used for the stack or as the program counter.


What does ALU do during E-time?

During E-time, the ALU (Arithmetic Logic Unit) performs arithmetic and logic operations on data. This involves executing instructions such as addition, subtraction, bitwise operations, and comparisons based on the control signals received from the CPU. The results of these operations are then sent back to the processor for further processing or storage. Essentially, E-time is when the ALU actively computes and manipulates data as instructed by the program.


How does ALU and CU work together?

The Arithmetic Logic Unit (ALU) performs arithmetic and logic operations on data, while the Control Unit (CU) manages the flow of data within the CPU. The CU directs the ALU on which operations to perform and coordinates the fetching, decoding, and executing of instructions in a program. Together, the ALU and CU work in harmony to process data and execute instructions in a CPU.


Write a statementin a java program to read 2 integers and dispay the number of interagers between them?

a=153 a=n%10;


How do you write a c program to calculate factorial using recursion?

unsigned long nfact(int n) if (n==2) return n else return n*nfact(n-1); For 32-bit integers, this program will fail at N==13, due to overflow. For 64-bit integers, it will fail at N==21. A solution for this is an arbitrary decimal arithmetic library, perhaps based on linked lists.


What is oprator?

It seems like you may have a typo in your question. If you are referring to the term "operator," in mathematics and computer science, an operator is a symbol that represents a mathematical or logical operation. Operators can be used to perform arithmetic calculations, comparison operations, or logical operations in programming languages. They are essential for manipulating data and controlling the flow of a program.


Application of arithmetic progression in design?

Arithmetic is important in design. This is true whether you are making a program for designs or you are trying to create a design.