Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

# Visual logic, help using loop and variables

### #1 Graxin Posted 12 November 2013 - 06:49 PM

Graxin

New Member

• Member
• 1 posts
So I'm tasked with writing a program to find out students grade using 4 different sets of scores (tests,quiz,lab, La) I'm trying to use a forloop to do this but she wants us to use this formula:"

wLab*(Lab1+Lab2+Lab3)+wQ1_4*(Q1+Q2+Q3+Q4)+wQ5*Q5+ wLA*(LA1+LA2+LA3+LA4)+wTest1*Test1+wTest2*Test2+wCP*CP

wLab = 0.08, wQ1_4=0.03, wQ5=0.08, wLA= 0.05, wTest1 =0.07, wTest2 = 0.14, wCP = 0.15"

What I'm having trouble with is using the for loop to give each quiz/test/ect a different variable name(Like quiz1, quiz2). I can make a chart that uses a for loop to get all the scores then add them for a total but in her formula she wants each score to have a seperate variable(I have no idea how I could attach a different variable to each input using a loop). Can someone lead me in the right direction to do that, or is it possible using a while loop?

Edited by Graxin, 12 November 2013 - 06:50 PM.

• 0

### Similar Topics

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users