Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- int main() {
- char c1, c2, c3;
- scanf("%c%c%c", &c1, &c2, &c3);
- if(!isdigit(c1) && !isalpha(c1)) {
- printf("0");
- }
- else {
- printf("1");
- }
- if(!isdigit(c2) && !isalpha(c2)) {
- printf("0");
- }
- else {
- printf("1");
- }
- if(!isdigit(c3) && !isalpha(c3)) {
- printf("0");
- }
- else {
- printf("1");
- }
- printf("\n");
- if(isalpha(c1)) {
- printf("0");
- }
- else {
- printf("1");
- }
- if(isalpha(c2)) {
- printf("0");
- }
- else {
- printf("1");
- }
- if(isalpha(c3)) {
- printf("0");
- }
- else {
- printf("1");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement