#include <stdio.h>
#include <string.h>
#include <conio.h>
main()
{
int iAge = 0;
int iResponse = 0;
char sName [80];
printf ("\n\tPlease, enter your name: \n");
gets (sName);
printf ("\n\tPlease, enter your age: \n");
scanf ("%d", &iAge);
printf ("\n\t1\tWin\n");
printf ("\n\t2\tLoose\n");
printf ("\n\t3\tDraw\n");
printf ("\n\tPlease, choose the finale: \n");
scanf ("%d", &iResponse);
char *strfry (char *sColor);
char *sColor [5] = {0};
sColor [0] = "White";
sColor [1] = "Black";
sColor [2] = "Blue";
sColor [3] = "Red";
sColor [4] = "Green";
char *strfry (char *sCar);
char *sCar [5] = {0};
sCar [0] = "Toyota Camry";
sCar [1] = "Cadillac CTS";
sCar [2] = "BMW X6";
sCar [3] = "Mercedes-Benz CLK";
sCar [4] = "Jaguar XF";
char *strfry (char *sState);
char *sState [5] = {0};
sState [0] = "Kentucky";
sState [1] = "Utah";
sState [2] = "North Carolina";
sState [3] = "Georgia";
sState [4] = "Indiana";
char *strfry (char *sCity);
char *sCity [5] = {0};
sCity [0] = "Taylorsville";
sCity [1] = "Shelbyville";
sCity [2] = "Fort Jackson";
sCity [3] = "Birmingham";
sCity [4] = "Nashville";
char *strfry (char *sStay);
char *sStay [5] = {0};
sStay [0] = "Marriott";
sStay [1] = "Crowne Plaza";
sStay [2] = "Residence Inn";
sStay [3] = "Hilton Garden Inn";
sStay [4] = "Springfield";
char *strfry (char *sEatery);
char *sEatery [5] = {0};
sEatery [0] = "Red Lobster";
sEatery [1] = "Longhorn Steakhouse";
sEatery [2] = "Stoney River";
sEatery [3] = "Backyard Burgers";
sEatery [4] = "Red Robin";
char *strfry (char *sSport);
char *sSport [5] = {0};
sSport [0] = "Football";
sSport [1] = "Soccer";
sSport [2] = "Basketball";
sSport [3] = "Hockey";
sSport [4] = "Baseball";
char *strfry (char *sTeam);
char *sTeam [5] = {0};
sTeam [0] = "Devils";
sTeam [1] = "Hawks";
sTeam [2] = "Lakers";
sTeam [3] = "Cardinals";
sTeam [4] = "Kings";
printf ("\n%c is %d years old and is a big fan of %s. One day %c decided to go to %s, %s to the %s game.\n", sName, iAge, sSport, sCity, sState, sSport);
printf ("\n%c's favorite team %s had the game with the host team. %c drove his %s %s all the way to %s, %s.", sName, sTeam, sColor, sCar, sCity, sState);
printf ("\n%c stayed at the beatiful %s. After early dinner at %s %c went to the game.", sName, sStay, sEatery);
switch (iResponse) {
case 1:
printf ("\nAfter celebrating the victory of %s at the same %s, %c went home.", sName, sTeam, sEatery);
break;
case 2:
printf ("\nThe game ended in a draw and %c with the fans of the host team went to %s to celebrate the meeting.", sName, sEatery);
break;
case 3:
printf ("\n%s lost and sad %c went home.", sTeam, sName);
break;
} // end switch
getch ();
} // end main
edit by ishkabible: please use code tags when posting code. like so,
This post has been edited by ishkabible: 10 June 2012 - 12:05 PM

New Topic/Question
Reply



MultiQuote




|