write a c programs to do multiplication of two numbers with
out using arithmatic operator ??????????
Answers were Sorted based on User's Feedback
Answer / mugdha
#include<stdio.h>
#include<conio.h>
void main()
{int i, j ,num1,num2;
printf("enter the value of num1 & num2");
scanf("%d%d",&num1,&num2);
for(i=1; i<=num1; i++)
for(j=1;j<=num2;j++)
{static int k=1;
k++;
)printf("%d\n",k);}
Is This Answer Correct ? | 12 Yes | 19 No |
Answer / mohan0877
#include<stdio.h>
main()
{
int a,b,result;
print("Enter values of a and b :")
scanf{"%d %d",&a,&b};
result=0;
while(b!=0)
{
if(b&01)
resultresul+a;
a<<=1;
b>>=1;
}
}
Is This Answer Correct ? | 3 Yes | 13 No |
Answer / vivekananda
#include<stdio.h>
void main()
{
int num = 2;
res = num << 1; //multiplication by 2
printf("%d\n",res);
}
Is This Answer Correct ? | 24 Yes | 37 No |
Answer / surajit
#include<stdio.h>
#include<conio.h>
void main()
{
int m,n,result=0;
printf("enter the value of m & n");
scanf("%d%d",&m,&n);
for(int i=1;i<=n;i++)
result=result+m;
printf("\n%d * %d =%d",m,n,result);
getch();
}
Is This Answer Correct ? | 6 Yes | 19 No |
Answer / dally
#include<stdio.h>
int main()
{
int a=9,b=7;
int sum =0;
while(a--)
sum = sum+b;
printf("%d\n",sum);
}
Is This Answer Correct ? | 12 Yes | 32 No |
Answer / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int m,n,result=0;
printf("enter the value of m & n");
scanf("%d%d",&m,&n);
for(int i=1;i<=n;i++)
result=result+m;
printf("\n%d * %d =%d",m,n,result);
getch();
}
Is This Answer Correct ? | 34 Yes | 59 No |
please help me.. how to write a code of this output?? "Enter range number:"10 1 is an odd number 2 is an even numbers 3 in an odd numbers 4 " to 10" "printing all odd numbers:" 1,3,5,7,9 "printing all even numbers:" 2,4,6,8,10 "sum of all odd numbers:25 "sum of all even numbers:30 using a C Programming ARRAY pleas pleas help.. its my project ..please :(
Explain what are reserved words?
how to find out the union of two character arrays?
Is there a way to compare two structure variables?
What is typeof in c?
Explain how can I convert a number to a string?
When c language was developed?
#define MAX(x,y) (x) > (y) ? (x) : (y) main() { int i = 10, j = 5, k = 0; k = MAX(i++, ++j); printf("%d %d %d", i,j,k); } what will the values of i , j and k? }
14 Answers CDAC, GATE, NDS, TCS,
what is the difference between %d and %*d in c languaga?
What is the difference between text and binary i/o?
What are conditional operators in C?
What are the keywords in c?