Untitled
Guest 197 22nd Jan, 2023
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("uzycie: %s <imie>\n", argv[0]);
return 1;
}
char *name = argv[1];
if(strcmp(name, "Konrad") != 0) {
while(strcmp(name, "Konrad") != 0) {
printf("podaj moje poprawne imie\n");
scanf("%s", name);
printf("imie podane przez input prompt\n");
}
}
else
printf("imie podane poprzez commandline argument\n");
int x = strlen(name);
printf("czesc, %s! dlugosc Twojego imienia to: %d\n", name, x);
return 0;
}
To share this paste please copy this url and send to your friends
RAW Paste Data