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
How can I read and write comma-delimited text?
what are the advantages of a macro over a function?
What are the advantages of the functions?
Define recursion in c.
What is meant by recursion?
What is a memory leak? How to avoid it?
Can we initialize extern variable in c?
What is string function c?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
Why n++ execute faster than n+1 ?
What is storage class?
Differentiate between the = symbol and == symbol?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
Why do we use pointer to pointer in c?