0
741views
Write a c program for multiplication using add shift method
1 Answer
| written 3.8 years ago by | • modified 3.8 years ago |
C Program for Multiplication using shift add method is : -
//importing library
#include<stdio.h>
int main(){
int a, b, c;
printf("Enter an integer: \n");
scanf("%d", &a);
printf("Enter an integer: \n");
scanf("%d", &b);
//multiply(a, b);
c = 0; //product
while(b != 0)
{
if(b & '\x01' == 1)
{
c = …