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


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.


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.


What are the main components of CPU of a computer system?

The central processing unit (CPU) is the brain of your computer. CPU is the electronic circuitry within a computer that carries out the instructions of a computer program by performing the basic arithmetic, logical, control and input/output operations specified by the instructions. Following are the prime components of CPU: - The arithmetic logic unit (ALU), which performs arithmetic and logical operations. - The control unit (CU), which extracts instructions from memory and decodes and executes them, calling on the ALU when necessary.


How do you spell caulutar?

The closest word is "calculator" (arithmetic computing device or program).