Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- printf("Aby wybrac program nacisnij odpowiedni klawisz: \n\n");
- int program;
- int tab[4][4], i, j;
- printf("1. Wyswietlenie macierzy 4x4 z podanych liczb.\n2. Dodanie dwoch macierzy z podanych liczb.\n3. mnozenie dwoch macierzy z podanych liczb.\n4. Zakoncz");
- printf("\nTu wpisz numer: ");
- scanf("%d", &program);
- switch (program)
- {
- case 1:
- for(i=0; i<4; i++)
- {
- for(j=0; j<4; j++)
- {
- printf("Podaj liczbe %d.%d: ", i, j);
- scanf("%d", &tab[i][j]);
- }
- }
- break;
- case 2:
- printf("2");
- break;
- case 3:
- printf("3");
- break;
- case 4:
- return 0;
- default:
- printf("wybierz jeden z programow");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement