Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacktoberfest 2023 #1244

Open
17AnuragMishra opened this issue Sep 29, 2023 · 5 comments
Open

Hacktoberfest 2023 #1244

17AnuragMishra opened this issue Sep 29, 2023 · 5 comments
Labels
wontfix This will not be worked on

Comments

@17AnuragMishra
Copy link

Fill up only the relevant details and skip or remove the rest.

Prerequisites

Please answer the following questions for yourself before submitting an issue.

YOU MAY DELETE THE PREREQUISITES SECTION.

  • [ Yes] I am running the latest version
  • [ Yes] I checked the readme and found no answer
  • [ Yes] I checked to make sure that this issue has not already been filed

Matrices-multiply-program-in-c-is-missing.

//here is the code-

#include<stdio.h>
int main(void)
{
int i, j, k, p, q, m = 0, n = 0, final = 0;
int fst[m][n], sec[m][n], mul[m][n];

printf(" Write the number of rows and columns for first matrix \n ");
scanf("%d%d", &m, &n);

printf(" Insert your matrix elements : \n ");
for (i = 0; i < m; i++)
    for (j = 0; j < n; j++) {
        scanf("%d", &fst[i][j]);
    }

printf(" Write the number of rows and columns for second matrix\n");
scanf(" %d %d", &p, &q);

if (n != p)
    printf(" Matrices cannot be multiplied with each other. \n ");
else
{
    printf(" Insert your elements for second matrix \n ");

    for (i = 0; i < p; i++)
        for (j = 0; j < q; j++)
            scanf("%d", &sec[i][j] );

    for (i = 0; i < m; i++) {
        for (j = 0; j < q; j++) {
            for (k = 0; k < p; k++) {
                final = final + fst[i][k] * sec[k][j];
            }
            mul[i][j] = final;
            final = 0;
        }
    }

    printf(" Matrix multiplication or product of the matrices is: \n ");
    for (i = 0; i < m; i++) {
        for (j = 0; j < q; j++)
            printf("%d \t", mul[i][j] );
        printf(" \n ");
    }
}
return 0;

}

@17AnuragMishra 17AnuragMishra changed the title Hacktoberfest 2019 Hacktoberfest 2023 Sep 29, 2023
@ShreyaSarkar10
Copy link

Helllo @17AnuragMishra , i want to work on this issue. kindly assign me.

@AnitaSahoo2002
Copy link

How to run this project locally?

@SkyePh
Copy link

SkyePh commented Mar 10, 2024

How to run this project locally?

execute the following code in your git bash terminal:

git clone {the url of the repo}

@SaquibShahid
Copy link

/assign

Copy link

stale bot commented Feb 1, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants