answersLogoWhite

0

int mul (int a, int b)

{

int sum= 0;

for (; b>0; --b) sum -= -a;

for (; b<0; ++b) sum -= a;

return sum;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

If Trojan multiplies what kind of destroying action do they do?

If a Trojan computer virus multiplies is can change into a program that is made specifically&Ecirc;to destroy a computer. Some Trojan computer viruses are made to infect multiple computers.


Examples of logical errors in c program?

Logical errors :- These errors occur because of logically incorrect instructions in the program. Let us assume that in a 1000 line program, if there should be an instruction, which multiplies two numbers and is wrongly written to perform addition. This logically incorrect instruction may produce wrong results. Detecting such errors are difficult.


Program to display multiplication of two matrix?

The matrix multiplication in c language : c program is used to multiply matrices with two dimensional array. This program multiplies two matrices which will be entered by the user.


What is float ADT?

A float ADT refers to the Abstract Data Type that represents floating-point numbers in a computer program. It typically includes operations for arithmetic calculations like addition, subtraction, multiplication, and division on floating-point numbers. Floats are used to represent real numbers with decimal points in programming and are implemented in languages like C, Java, and Python.


What is the pattern of repeated segmentation called?

The pattern of repeated segmentation is called segmentation fault or segfault. This occurs when a program tries to access a memory segment that it doesn't have permission to access, leading to a segmentation violation error.


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


How are Florida id numbers assigned?

Through a computer program that randomizes numbers.


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


What is matrix programming in C programming?

C Examples on Matrix OperationsA matrix is a rectangular array of numbers or symbols arranged in rows and columns. The following section contains a list of C programs which perform the operations of Addition, Subtraction and Multiplication on the 2 matrices. The section also deals with evaluating the transpose of a given matrix. The transpose of a matrix is the interchange of rows and columns.The section also has programs on finding the trace of 2 matrices, calculating the sum and difference of two matrices. It also has a C program which is used to perform multiplication of a matrix using recursion.C Program to Calculate the Addition or Subtraction & Trace of 2 MatricesC Program to Find the Transpose of a given MatrixC Program to Compute the Product of Two MatricesC Program to Calculate the Sum & Difference of the MatricesC Program to Perform Matrix Multiplication using Recursion


What is Excel on computers?

Excel is a specialized program that manages numbers in various ways. It uses spreadsheets and data to process a large amount of numbers. One enters the data, or numbers, and the program calculates the numbrs in the manner you designate in the program.


How do you write a VBnet program to find the prime numbers between 100 to 200?

VBnet program to find the prime numbers between 100 to 200?