Jump to content
Fórum Script Brasil
  • 0
Sign in to follow this  
Guest - Rodrigo -

Cálculos

Question

Guest - Rodrigo -

Estou tentando fazer um cálculo de pesos relativos dos segmentos do corpo humano, mas tah dando erro. o teste de código que eu fiz foi o seguinte:

<% option explicit %>

<font face="verdana" size="2">

<% if request.querystring("calcula")="sim" then

DIM peso, pesocab, pesotr, pesocx, pesopr, pesobr, pesoab, pesom

peso = request.querystring("peso")

if request.querystring("protocolo")="clauser" then

pesocab = 7,3 * " & peso & " / 100

response.write" " & pesocab & " "

end if

end if

%>

<form action="pesor.asp" method="GET">

<input type="hidden" name="calcula" value="sim">

Digite seu peso: <input type="text" name="peso"><BR><BR>

Selecione o Protocolo:<BR>

<input type="radio" name="protocolo" value="clauser">Clasuser (adultos)<BR>

<input type="radio" name="protocolo" value="jensen">Jensen (12 anos)<BR>

<input type="radio" name="protocolo" value="jensen15">Jensen (15 anos)<BR>

o erro que retorna é:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/cinesio/pesor.asp, line 7

pesocab = 7,3 * " & peso & " / 100

o que acontece?

<input type="submit" value="CALCULAR">

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Tente fazer o seguinte:

pesocab = 7.3 * Cint(peso) / 100

Lembrando que cálculo não pode ser com virgula e sim com ponto.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  



  • Forum Statistics

    • Total Topics
      148588
    • Total Posts
      644154
×
×
  • Create New...