Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char str[3];
- char str1[9];
- printf("Hello! Are you Sean?\n");
- scanf("%s",&str);
- int res = strncmp(str, "yes?", 3);
- if(res == 0)
- {
- printf("Welcome back! It's good to see you again.\n");
- printf("How is the weather out there?\n");
- scanf("%s",&str1);
- int res=strncmp(str1, "good?",9);
- if(res==0)
- {
- printf("Glad to hear it! Have a nice, sunny day!\n");
- }
- else if(res==1)
- {
- printf("Oh. Well, let me know when he gets back.\n");
- }
- }
- else if(res==1)
- {
- printf("Darn it. Well, maybe tomorrow then!");
- }
- return(0);
- }
Add Comment
Please, Sign In to add comment