menu search
brightness_auto
more_vert
To tentando fazer um programa que tire o numero fatorial do que o usuário entrar.
Pra quem nao sabe, fatorial se calcula assim:
2!=2.1
5!=5*4*3*2*1
10!=10*9*8*7*6*5*4*3*2*1
To fazendo em pascal mas tenho que fazer usando só while, e ta dando errado alguma coisa porque quando boto pra calcular ele mostra só o número que foi de entrada vezes 1 que seria o ultimo numero a multiplicar.
por enquanto o meu ficou assim:

Program Pzim ;
 Uses
 CRT;
 var
 N,M,I,resp:real;
 Begin
  resp:=1;
  while(resp=1)do
     begin
     writeln('Digite o numero fatorial: ');
     readln(N);
     I:=N;
     while(I>1)do
            begin
           M:=N*(I-1);
           I:=I-1;
          end;
     writeln('O numero e: ',M:7:2);
     writeln('Digite 1 para continuar e 2 para fechar');
    readln(resp);
    end;
 End.
thumb_up_off_alt 2 votos positivos thumb_down_off_alt 0 votos negativos

Sua resposta

Seu nome (opcional):
Privacidade: Seu email será usado apenas para enviar estas notificações.

201 Respostas

more_vert
purple pharmacy mexico price list <a href=" http://lzdsxxb.com/home.php?mod=space&uid=3457065 ">mexico drug stores pharmacies</a> or <a href=" https://maps.google.jo/url?q=https://mexicanpharmgate.com ">best online pharmacies in mexico</a>
http://www.tifosy.de/url?q=https://mexicanpharmgate.com medicine in mexico pharmacies
<a href=https://images.google.nu/url?sa=t&url=https://mexicanpharmgate.com>mexico drug stores pharmacies</a> best online pharmacies in mexico and <a href=https://bbs.laisf.cn/home.php?mod=space&uid=50076>pharmacies in mexico that ship to usa</a> mexican online pharmacies prescription drugs
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
mexico pharmacies prescription drugs <a href=https://mexicanpharmgate.com/#>mexican drugstore online</a> п»їbest mexican online pharmacies
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
buy medicines online in india: <a href=" http://indianpharmacyeasy.com/# ">indianpharmacyeasy</a> - п»їlegitimate online pharmacies india
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
Best Canadian online pharmacy <a href=" http://www.donggoudi.com/home.php?mod=space&uid=1769852 ">Canadian pharmacy best prices</a> or <a href=" https://www.google.cd/url?q=https://canadiandrugsgate.com ">Canada pharmacy</a>
https://yassu.jp/bidan/town/kboard.cgi?mode=res_html&owner=proscar&url=canadiandrugsgate.com Canada pharmacy online
<a href=https://www.google.dk/url?q=https://canadiandrugsgate.com>Canada pharmacy online</a> Best Canadian online pharmacy and <a href=https://forexzloty.pl/members/434371-yffqqdzylx>canadian pharmacy drugs gate</a> canadiandrugsgate.com
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
http://canadiandrugsgate.com/# cat antibiotics without pet prescription
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
mail order pharmacy india: <a href=" https://indianpharmacyeasy.com/# ">Online medicine home delivery</a> - Online medicine order
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
home remedies for ed: <a href=" https://canadiandrugsgate.com/# ">Best Canadian online pharmacy</a> - herbal remedies for ed
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
prescription drugs without doctor approval <a href=https://canadiandrugsgate.com/#>Canada pharmacy</a> how to help ed
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
http://mexicanpharmgate.com/# mexican border pharmacies shipping to usa
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
more_vert
buy prescription drugs from india: <a href=" https://indianpharmacyeasy.com/# ">Indian online pharmacy ship to usa</a> - buy prescription drugs from india
thumb_up_off_alt 0 votos positivos thumb_down_off_alt 0 votos negativos
...