Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define N 10
- int main(void)
- {
- char str_tot[50], str_parz[10];
- int i = 0, boolean = 0;
- do
- {
- printf("Inserire una parola:\t");
- scanf_s("%s", str_parz, sizeof(str_parz));
- if (strcmp(str_parz, "fine") != 0)
- {
- strcat(str_tot, str_parz);
- strcat(str_tot, "");
- }
- else
- {
- boolean = 1;
- }
- } while (boolean != '1' || strlen(str_tot) < 50);
- printf("%s\n", str_tot);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement