Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main () {
- int girl1 = 0, girl2 = 0;
- int yourHei, tmp, delta;
- char name1[30], name2[30];
- printf("%*s%s%*s\n\n", 5, "", "Welcome to Chat & Choose", 5, "");
- printf("Please login first! Enter your height(cm): ");
- scanf("%d", &yourHei);
- printf("\nYour first girl's name: ");
- while(getchar() != '\n');
- scanf("%[^\n]", name1);
- printf("\nYour second girl's name: ");
- while(getchar() != '\n');
- scanf("%[^\n]", name2);
- printf("\n-------------------------\n");
- printf("Hello, %s\n", name1);
- printf("Me: how old are you, %s?\n%s: ", name1, name1);
- scanf("%d", &tmp);
- girl1 += (delta = tmp > 16 ? (tmp >= 21 ? 5 : 2) : -2);
- printf("(%d)\n", delta);
- printf("Me: %s! And, what's your height?\n%s: ", tmp > 16 ? (tmp >= 21 ? "so sweet" : "so beautiful") : "so cute", name1);
- scanf("%d", &tmp);
- girl1 += (delta = tmp-yourHei >= -30 ? ((tmp-yourHei)>=0 ? -1 : 3) : -2);
- printf("(%d)\n", delta);
- printf("Me: %s\n", delta == -2 ? "What a cute little girl!" : (delta == 1 ? "Wow, you owned a beautiful figure!" : "You're really a sweet girl!"));
- printf("\n-------------------------\n");
- printf("Hello, %s\n", name2);
- printf("Me: how old are you, %s?\n%s: ", name2, name2);
- scanf("%d", &tmp);
- girl2 += (delta = tmp > 16 ? (tmp >= 21 ? 5 : 2) : -2);
- printf("(%d)\n", delta);
- printf("Me: %s! And, what's your height?\n%s: ", tmp > 16 ? (tmp < 21 ? "so sweet" : "so beautiful") : "so cute", name2);
- scanf("%d", &tmp);
- girl2 += (delta = tmp-yourHei >= -30 ? ((tmp-yourHei)>=0 ? -1 : 3) : -2);
- printf("(%d)\n", delta);
- printf("Me: %s\n", delta == -2 ? "What a cute little girl!" : (delta == 1 ? "Wow, you owned a beautiful figure!" : "You're really a sweet girl!"));
- printf("\n-------------------------\n");
- printf("Time of the decision: \n");
- char decision[100];
- strcat(decision, girl1 > girl2 ? name1 : (girl1 < girl2 ? name2 : name1));
- girl1 == girl2 ? strcat(decision, "?\nMe: are you free on Sunday, ") : 0;
- girl1 == girl2 ? strcat(decision, name2) : 0;
- printf("Me: are you free on Saturday, %s?\n", decision);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement