Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- #include <string.h>
- int main() {
- char s[1000];
- scanf("%s", s);
- for(int i = 0; i < strlen(s); i++) {
- if(isalpha(s[i])) {
- printf("Karaktarot %c e del alphabetical\n", s[i]);
- }
- if(isdigit(s[i])) {
- printf("Karakterot %c e cifra\n", s[i]);
- }
- if(isalnum(s[i])) {
- printf("Karakterot %c e ili bukva ili cifra\n", s[i]);
- }
- if(isspace(s[i])) {
- printf("Karakterot empty space\n");
- }
- if(!isspace(s[i]) && !isalnum(s[i])) {
- printf("Karakterot %c e specijalen karakter\n", s[i]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement