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
Where are local variables stored in c?
how to count no of words,characters,lines in a paragraph.
How can I swap two values without using a temporary?
Is linux written in c?
Explain high-order and low-order bytes.
What does a pointer variable always consist of?
What is %d called in c?
Explain what is the most efficient way to store flag values?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What are the types of data structures in c?
Why do we need arrays in c?
What is the use of getchar() function?
Explain how do you override a defined macro?
application attempts to perform an operation?
Can a file other than a .h file be included with #include?