Go Back   Tech Support Forum > The IT Pro > Programming

Visual Logic

This is a discussion on Visual Logic within the Programming forums, part of the Tech Support Forum category. Hi! guys I was just wondering if someone could help me with a Visual Logic problem that I was having.


Reply
 
Thread Tools Search this Thread
Old 04-15-2011, 11:50 PM   #1
Registered Member
 
Join Date: Apr 2011
Posts: 3
OS: Windows XP



Hi! guys I was just wondering if someone could help me with a Visual Logic problem that I was having.

(topgrade) Create the logic for a program that accepts student name and 5 grades as input. The five grades are for 5 different exams. Output the name and corresponding top grade for each of the 5 exams. Use procedures to break the program into logical "chunk(s)" if necessary.

I've started my program I already have the name down and I used a for loop in order to allow 5 grades to be input. But I can't figure out how to output the Top grade I know that you can use an array for that but I am not sure how can someone guide me the right away I can post screenshots if possible Thank you =)

__________________
dontpokeme19 is offline   Reply With Quote
Old 04-16-2011, 01:33 AM   #2
Windows Tech Team
 
Join Date: Jul 2010
Location: SA
Posts: 1,921
OS: DOS 3.3



Hi

Just to note we are not allowed to help with homework. However we are allowed to point you in the right direction.
I had never heard of Visual Logic before this. So I can only tell you what to try.

1. Create an assignment eg TopGrade = 0
2. During your For Loop use an If Condition to compare the grade you have just entered to the Variable TopGrade (created in 1). If the input is greater than TopGrade then TopGrade = Input value. If Input is Less Than TopGrade then do nothing.

__________________
AlbertMC2 is offline   Reply With Quote
Old 04-16-2011, 03:19 PM   #3
TSF-Emeritus
 
Ninjaboi's Avatar
 
Join Date: Dec 2010
Location: U.S.A., Texas
Posts: 2,047
OS: Windows XP SP3, Ubuntu 10

My System


Hello dontpokeme19, welcome to TSF!

Albert is correct that we are not able to directly help you with homework, but we can however point you in the right direction. For more on the rules, please go here.

Using Visual Logic, you can easily create output by left-clicking on the flow arrow in your program and selecting 'Output' from the list of items. Double-click the new item that is created by clicking 'Output', and the rest is for you to do.

Source(s):

Visual Logic

Visual Logic - Output
__________________
Ninjaboi is offline   Reply With Quote
Old 04-16-2011, 09:30 PM   #4
Registered Member
 
Join Date: Apr 2011
Posts: 3
OS: Windows XP



This is what I have so far I need to figure out what the Top grade is an output I attached an example of what I have so far
Attached Thumbnails
Click image for larger version

Name:	Example.jpg
Views:	494
Size:	48.0 KB
ID:	90344  
__________________
dontpokeme19 is offline   Reply With Quote
Old 04-17-2011, 03:31 AM   #5
Windows Tech Team
 
Join Date: Jul 2010
Location: SA
Posts: 1,921
OS: DOS 3.3



Hi

Problems:
1. You have created an array (grade) but you do not put the grades into the array.
Your input should rather be: grade(gd)
Grade is your array and gd is the number of the item in the array (gd = 0 to 4 = 5 items)

2. When you output your grades you do not output all of them. Once again you will have to output the items from the array by using a similar FOR loop.
Do you have to output all the grades or just the top grade?

Topgrade:
For the topgrade you need to create an IF loop just after the Input of each grade but still in the FOR loop.
The IF loop condition will be something like grade(gd)>tograde.
Then on the true branch you can have topgrade=grade(gd)
And do nothing on the false branch.
This will compare the grade you have just entered and compare it with the top grade. If the grade you have just entered is larger than the top grade then it becomes the top grade else the top grade remains the same.

Hope this helps.
__________________
AlbertMC2 is offline   Reply With Quote
Old 04-17-2011, 10:14 PM   #6
Registered Member
 
Join Date: Apr 2011
Posts: 3
OS: Windows XP



I figured it out and I put the loops in a method or procedure in order to make it easier to read Thank you for the help It helped me understand how to use arrays and for loops together thanks =)
Attached Thumbnails
Click image for larger version

Name:	yay.jpg
Views:	311
Size:	44.1 KB
ID:	90400  

__________________
dontpokeme19 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected Slowness, Please Help
Hello guys, I'm new here, And the problem is that my laptop is running slower, booting slower, and internet activity is really slow. My ping from pingtest.net is really high as well and i heard that may be from viruses,trojans, malware, or anything else like that. specs: Windows 7 64-bit 4GB...
ShadowBorn Inactive Malware Help Topics 3 03-28-2011 09:31 AM
Cant Install Microsoft Visual C++ 2008 Redistributable
I was trying to install Need For Speed Hot Pursuit and before i started my installation, it tried to(automatically) install Visual C++ 2008 redistributable first. However, even before the installation for Visual C++ 2008 start, it says 'The installation package or a needed file could not be opened....
louis0902 Microsoft Office support 3 02-27-2011 11:41 AM
Visual studios (C++)
Hello, i am fairly new to programming with C++, but would like to start game development. I already know the basics with the "#include" portions that are needed to run strings, arrays, etc, but i would like to start programming games, but don't know where to start. Side question, what's the...
Saturisk Programming 37 02-18-2011 11:19 PM
[SOLVED] VCExpress Problem, Probably AppData\Permissions Problem?
I think it should be related to this forum because I think the problem is something with AppData \ Permissions which is related to Windows 7. I'm having a problem while running\installing Visual C++. The problem started 2 days ago, it did work before. When I'm trying to run I'm getting this...
benben12 Windows 7 Support, Windows Vista Support 8 02-09-2011 01:45 PM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2


All times are GMT -7. The time now is 05:20 AM.


Copyright 2001 - 2014, Tech Support Forum

Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts