Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // menu.cpp : Defines the entry point for the console application.
- //
- #include "header.h"
- int main()
- {
- int a[10][10],b[10][10],w[10][10],i,j,k,n,liczba,l;
- char z;
- visiting_card();
- menu();
- z = getch();
- switch(z)
- {
- case '0':
- system("cls");
- for (i=1; i<=n; i++)
- {
- for (j=1; j<=n; j++)
- {
- w[i][j] = a[i][j]+b[i][j];
- }
- }
- break;
- case '1':
- system("cls");
- for (i=1; i<=n; i++)
- {
- for (j=1; j<=n; j++)
- {
- w[i][j] = a[i][j]-b[i][j];
- }
- }
- break;
- case '2':
- system("cls");
- for(i=1; i<=n; i++)
- {
- for(j=1; j<=n; j++)
- {
- w[i][j] = 0;
- for(k=1; k<=n; k++)
- {
- w[i][j] = w[i][j] + (a[i][k] * b[k][j]);
- }
- }
- case '3':
- system("cls");
- for (i=1; i<=n; i++)
- {
- for (j=1; j<=n; j++)
- {
- b[i][j] = a[j][i];
- }
- }
- case '4':
- system("cls");
- for (i=1; i<=n; i++)
- {
- for (j=1; j<=n; j++)
- {
- w[i][j] = liczba * a[i][j];
- }
- }
- }
- }}
Add Comment
Please, Sign In to add comment