General discussion

Locked

If, Then, Else Statement

By Petadove ·
I am writing a program to calculate student grades. Students receive bonus points for Extra credit work and they also receive penalty for late submission of work.

my statement goes something like
if radxxxxxx.visble = true then txtxxxxxxx.value- numxxxxx.value + 5 (or minus) depending on the radio button I am working with.

I am not sure if anyone can give me assistance based on this scenario but if someone can I'd be grateful.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

If, Then, Else Statement

by john_wills In reply to If, Then, Else Statement

The question? The problem? The definition of what is required?

Collapse -

If, Then, Else Statement

by Petadove In reply to If, Then, Else Statement

Poster rated this answer

Collapse -

If, Then, Else Statement

by amanabala In reply to If, Then, Else Statement

Hello,

I am assuming that there are a set of radio buttons, corresponding text boxes(2 sets).
If you put the radio buttons and the text boxes in arrays (depending on the programming language, how you achieve this will change).
When you use arrays, your statement will look like
in VB
indx = rad.selectedIndex
if indx = 1 then ' Extra credit
extra=5
else if indx=2 then
extra =-5
end if

grade = txt(indx)-num1(indx)+extra

wher your radio button array is called rad,
txt is the name of the text box array and num1 is the name of the values array

If you can give me more specifics, may be I can give a detailed answer.

regards,
Ravi
ananth_manabala@yahoo.com

Collapse -

If, Then, Else Statement

by Petadove In reply to If, Then, Else Statement

Poster rated this answer

Collapse -

If, Then, Else Statement

by Petadove In reply to If, Then, Else Statement

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums