# Thread: Compute quadratic equation using function

1. ## Compute quadratic equation using function

Question asked by luwam tewolde

1.Write a c++ program that computes quadratic equation using function?
2.Write a program that computes the product the product of a 3*3 matrix equation. (hint use multidimension array) ?
I need answer for is question as soon as .

2. ## Re: Compute quadratic equation using function

Use macros......

#define F(x) x^2+7*x-10

then write ur simple program using F(x)

3. ## Re: Compute quadratic equation using function

Program for computing product of 3*3 matrix

Code:
```void main()
{
int a[3][3],b[3][3],c[3][3],i,j,k;
clrscr();

printf("Enter elements of A:");
for(i=0;i<=2;i++)
for(j=0;j<=2;j++)
scanf("%d",&a[i][j]);

printf("Enter elements of B:");
for(i=0;i<=2;i++)
for(j=0;j<=2;j++)
scanf("%d",&b[i][j]);

printf("A:");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
printf("%d ",a[i][j]);
printf(""); //To change line.
}

printf("B:");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
printf("%d ",b[i][j]);
printf("
");
}
k=0;
while(k<=2)
{
for(i=0;i<=2;i++)
{
int sum=0;
for(j=0;j<=2;j++)
sum=sum+a[i][j]*b[j][k];
c[i][k]=sum;
}
k++;
}
printf("Result:");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
printf("%d ",c[i][j]);
printf(" ");
}
getch();
}```

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
###### About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.