write a program in c language for the multiplication of two
matrices using pointers?
Answer Posted / tutu
#include<stdio.h>
#include<conio.h>
int main()
{
int mul(int,int);
int n1,n2,f=1,ans;
while(f==1)
{
printf("\n***MULTIPLICATION OF TWO NATURAL
NUMBERS***");
printf("\nEnter Two Numbers: ");
scanf("%d %d",&n1,&n2);
if(n1<=0||n2<=0)
{
printf("\nInvalid Choice...");
printf("\nDo You Want To Try
Again...\n1.Yes\n2.No");
scanf("%d",&f);
}
else
{
printf("\nAns = %d",mul(n1,n2),"\n");
printf("\nDo You Want To
Continue:\n1.Yes\n2.No\n");
scanf("%d",&f);
}
}
}
int mul(int a,int b)
{
return((b-1)*a+a);
}
| Is This Answer Correct ? | 19 Yes | 26 No |
Post New Answer View All Answers
What are two dimensional arrays alternatively called as?
What is the explanation for modular programming?
What is the use of define in c?
Why is #define used?
Describe static function with its usage?
What is the difference between call by value and call by reference in c?
Explain function?
Explain heap and queue.
Can you write a programmer for FACTORIAL using recursion?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What is the size of empty structure in c?
what will be maximum number of comparisons when number of elements are given?
Multiply an Integer Number by 2 Without Using Multiplication Operator
Is there a way to compare two structure variables?
what are the facialities provided by you after the selection of the student.