Ir ao conteúdo
  • Cadastre-se

Rogerio Galhardo

Membro Júnior
  • Posts

    4
  • Cadastrado em

  • Última visita

Reputação

0
  1. Bom, eu fiz esse código no Visualg e mandei ele passar para Pascal, porém da um erro FIM DE ARQUIVO não esperado. Estou usando o pascalzim 5.1.1. program Family;uses Crt;varsurvey,ne,op:integer;dig,p1,pe1,p2,pe2,p3,pe3,p4,pe4,p5,pe5:string;beginwriteln; writeln('digite 1 para começar ou esc para sair'); readln(op); case (op) of 1 : begin ClrScr; p1:= 'preto'; pe1:='1-XXXXXXXXX'; p2:= 'roxo'; pe2:='2-XXXXXXXXX'; p3:= 'laranja'; pe3:='3-XXXXXXXXX'; p4:= 'marrom'; pe4:='4-XXXXXXXXX'; p5:= 'amarelo'; pe5:='5-XXXXXXXXX'; writeln(' FAMILY FEUD'); writeln; writeln('Qual a pior cor para se pintar uma casa?'); writeln('/======================================/'); writeln(pe1); writeln(pe2); writeln(pe3); writeln(pe4); writeln(pe5); writeln('/======================================/'); write('Qual sua resposta: '); readln(dig); if(p1=dig) and (pe1 ='1-XXXXXXXXX') then begin pe1 :=p1; end else begin if(p2=dig) and (pe2 ='2-XXXXXXXXX') then begin pe2 :=p2; end else begin if(p3=dig) and (pe3 ='3-XXXXXXXXX') then begin pe3 :=p3; end else begin if(p4=dig) and (pe4 ='4-XXXXXXXXX') then begin pe4 :=p4; end else begin if(p5=dig) and (pe5 ='5-XXXXXXXXX') then begin pe5:=p5; end else begin ne:=ne+1; end; end; end; end; end; if(ne=1) then begin writeln('X'); end else begin if(ne=2) then begin writeln('XX'); end else begin if(ne>=3) then begin writeln('XXX'); writeln('OBRIGADO POR JOGAR FAMILY FEUD'); writeln('ATÈ A PRÓXIMA VEZ'); end; end; end; end;
  2. Linguagem C estou usando o Dev C++
  3. Rogerio Galhardo

    Ajuda

    OLá gostaria de fazer um jogo de perguntas e respostas estilo family feud,porém não sei que comando usar para que apareça no quadro a respostas que eu digitei quem souber por favor me ajude.

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!