Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <Windows.h>
- #include <string.h>
- #include <stdlib.h>
- #define ILE 3
- char ss[ILE][255];
- int i, j, k;
- int main(void)
- {
- for (k = 0; k < ILE; ++k)
- {
- printf("Podaj dane nr %i", k + 1);
- printf("\n");
- scanf_s("%s", ss[k], sizeof(ss[k]));
- }
- printf(" 1 2 3 4 5\n"); //drukowanie poziomej numeracji tabeli
- for (i = 0; i <= 4; ++i) {
- printf("%d ", i + 1);//drukowanie pionowej numeracji tabeli
- for (j = 0; j <= 4; ++j) {
- if (strcmp(ss[i], ss[j]) == 0)
- printf("R ");
- else
- printf("N ");//funkcja porównująca wartości wskaźnika ss równość zapisuje jako R a nierówność jako N
- }
- printf("\n");
- }
- system("pause"); //zatrzymanie okna konsoli
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement