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 to execute a program using if else condition and the output should enter number and the number is odd only...
What is wrong with this program statement? void = 10;
What is the -> in c?
What is pass by reference in functions?
Explain c preprocessor?
What is a ternary operator in c?
please send me the code for multiplying sparse matrix using c
Is it better to use a macro or a function?
Explain the ternary tree?
using only #include
Explain modulus operator. What are the restrictions of a modulus operator?
What is the use of a static variable in c?
to find the closest pair
Explain how do you list a file’s date and time?
What is a char in c?