Pascal/Turbo Pascal - URGENTE, necesito programa para jugar "quien quiere ser millonario"!!!!

 
Vista:

URGENTE, necesito programa para jugar "quien quiere ser millonario"!!!!

Publicado por Andrea (1 intervención) el 22/11/2014 21:56:12
Por favor, necesito urgente programa en turbo pascal para crear un juego "Quien quiere ser millonario"... La idea es cada pregunta tenga unas tres alternativas. Las preguntas deben ser de mas basicas a unas mas dificiles y si acertas la respuesta continuas con la siguiente pregunta y vas ganando un millón de pesos. Pueden ser unas 10 preguntas?? con 3 alternativas cada una?,
Por supuesto colocar pantallas con un logo del juego, algo novedoso y que no sea copiado. Gracias!!!... estaré atenta a sus respuestas... necesito el código con la mayor informacion posible... !!!GRACIAS-... NECESITO URGENTE ES PARA MAÑANA
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

URGENTE, necesito programa para jugar "quien quiere ser millonario"!!!!

Publicado por ramon (2158 intervenciones) el 25/11/2014 12:07:17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
{Mira para empezar tendras que crear un archivo de informacion de la pregunta su respuesta y 2 gazapos
como podras ver en estas lineas espero esto sea lo que vuscas el resto espero lo soluciones tu si no dimelo
y intentare darte mas datos suerte}
 
program millonario;
  uses
     crt;
  const
     archi : string = 'Lospregu.dat';
  type
    string80 = string[80];
    preguntas = record
           pregt : string80;
           respt : string80;
           gaz1, gaz2 : string80;
          end;
 
    var
      f : file of preguntas;
      toma : preguntas;
      cont : integer;
      respuesta : boolean;
      pregun : array[1..10] of preguntas;
 
   procedure guarda_preguntas(t : preguntas);
   begin
      assign(f,archi);
   {$I-} reset(f); {$I+}
   if ioresult <> 0 then
   begin
      rewrite(f);
      seek(f,0);
      write(f,t);
      close(f);
   end
 else
     begin
        seek(f,filesize(f));
        write(f,t);
        close(f);
     end;
   end;
 
  procedure entrada_preguntas;
  var
    te : char;
  begin
     clrscr;
     gotoxy(10,2);write('****** Entrada Preguntas Del Juego ******');
     gotoxy(3,4);write('ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ');
     gotoxy(3,5);write('³ Pregunta  :                                                    ³Û');
     gotoxy(3,6);write('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´Û');
     gotoxy(3,7);write('³                        Respuestas                             ³Û');
     gotoxy(3,8);write('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´Û');
     gotoxy(3,9);write('³ Es Cierta :                                                   ³Û');
    gotoxy(3,10);write('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´Û');
    gotoxy(3,11);write('³ Gazapo 1  :                                                   ³Û');
    gotoxy(3,12);write('ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´Û');
    gotoxy(3,13);write('³ Gazapo 2  :                                                   ³Û');
    gotoxy(3,14);write('ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ');
    gotoxy(3,15);write('  ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ');
    gotoxy(17,5);readln(toma.pregt);
    gotoxy(17,9);readln(toma.respt);
    gotoxy(17,11);readln(toma.gaz1);
    gotoxy(17,13);readln(toma.gaz2);
    gotoxy(10,17);write('<<<<< Datos Correctos [S/N] O [X] = Nada >>>>>>');
    repeat
       te := upcase(readkey);
    until te in['S','N','X'];
  if te <> 'X' then
  begin
  if te = 'S' then
  begin
  guarda_preguntas(toma);
  end
 else
   entrada_preguntas;
  end;
 end;
 
 procedure comprueva_pregunta(pre, r : string80);
 var
    vusca : longint;
    resp : boolean;
    dd : preguntas;
    v, c : integer;
 begin
    respuesta := false;
    resp := false;
    assign(f,archi);
   {$I-} reset(f); {$I+}
   if ioresult <> 0 then
   begin
       clrscr;
       writeln('   Error De Archivo No Encontrado Pulse Una Tecla');
       readkey;
   end
 else
     begin
        for c := 1 to length(r) do
        r[c] := upcase(r[c]);
        for vusca := 0 to filesize(f) - 1 do
        begin
         seek(f,vusca);
         read(f,dd);
         for v := 1 to length(dd.respt) do
         dd.respt[v] := upcase(dd.respt[v]);
         if (dd.pregt = pre) and (dd.respt = r) then
         begin
            resp := true;
            break;
         end;
      end;
       if resp = true then
       begin
       gotoxy(4,11);write('      $$$$$$$$ Su Respuesta Es Correcta $$$$$$$$');
       respuesta := true;
       gotoxy(4,13);write('     **** Pulse Una Tecla ****');
       readkey;
       end
     else
       begin
       gotoxy(4,11);write('      !!!!!!!!! Error Falso Para Otra Sera !!!!!!!!!!');
       gotoxy(4,13);write('     **** Pulse Una Tecla ****');
       readkey;
       end;
       close(f);
   end;
 end;
   procedure carga_preguntas_juego;
   var
     long, g : longint;
    begin
       assign(f,archi);
   {$I-} reset(f); {$I+}
   if ioresult <> 0 then
   begin
       clrscr;
       writeln('   Error De Archivo No Encontrado Pulse Una Tecla');
       readkey;
   end
 else
     begin
        long := filesize(f) - 1;
        if long > 10 then
        begin
        for g := 0 to  9 do
        begin
           seek(f,g);
           read(f,pregun[g + 1]);
        end;
       end
     else
         begin
           for g := 0 to long do
           begin
           seek(f,g);
           read(f,pregun[g + 1]);
        end;
       end;
        close(f);
     end;
    end;
 
   procedure muestra_pregunta(n : integer);
   var
     tr : char;
     tomado : string80;
   begin
      clrscr;
      carga_preguntas_juego;
      gotoxy(2,2);write('ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ  ');
      gotoxy(2,3);write('Û ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
      gotoxy(2,4);write('Û ³ Pregunta :                                                       ³');
      gotoxy(2,5);write('Û ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
      gotoxy(2,6);write('Û ³ Respuesta [1] :                                                  ³');
      gotoxy(2,7);write('Û ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
      gotoxy(2,8);write('Û ³ Respuesta [2] :                                                  ³');
      gotoxy(2,9);write('Û ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
     gotoxy(2,10);write('Û ³ Respuesta [3] :                                                  ³');
     gotoxy(2,11);write('  ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
     textcolor(14);
     gotoxy(17,4);write(pregun[n].pregt);
     textcolor(7);
     gotoxy(22,6);write(pregun[n].gaz1);
     gotoxy(22,8);write(pregun[n].respt);
     gotoxy(22,10);write(pregun[n].gaz2);
     gotoxy(5,13);write('<<<<<< Elija Respuesta >>>>>>>');
    repeat
     tr := readkey;
    until tr in['1','2','3'];
    case tr of
 '1' : tomado := copy(pregun[n].gaz1,1,length(pregun[n].gaz1));
 '2' : tomado := copy(pregun[n].respt,1,length(pregun[n].respt));
 '3' : tomado := copy(pregun[n].gaz2,1,length(pregun[n].gaz2));
    end;
    if pregun[n].respt =  tomado then
    begin
    gotoxy(10,15);write('******* Contestacion Correcta *********');
    gotoxy(10,17);write('>>>>>> Pulse Una Tecla <<<<<<');
    readkey;
    end
  else
     begin
       gotoxy(10,15);write('******* Contestacion In Correcta *********');
       gotoxy(10,17);write('>>>>>> Pulse Una Tecla <<<<<<');
       readkey;
     end;
   end;
 
 
 
  procedure menu;
  var
    salir : boolean;
    tecla : char;
  begin
     salir := false;
   repeat
       clrscr;
       writeln('   ********** Menu Juego Quien Quiere Ser Millonario *********');
       writeln;
       writeln('   [E] = Entrada Preguntas');
       writeln('   [J] = Jugar');
       writeln('   [S] = Salir');
       writeln;
       writeln('   >>>>>>>>>>> Elija Opcion <<<<<<<<<<<<<');
       repeat
           tecla := upcase(readkey);
       until tecla in['E','J','S'];
       clrscr;
     case tecla of
  'E' : entrada_preguntas;
  'J' : muestra_pregunta(1);
  'S' : salir := true;
     end;
   until salir = true;
  end;
 
  begin
     clrscr;
     randomize;
     menu;
  end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar