Computer Science Canada hi i need help in turing programming. how to do between programing |
Author: | fatal_xxkillerzxx [ Wed Nov 28, 2012 10:05 pm ] | ||||
Post subject: | hi i need help in turing programming. how to do between programing | ||||
plz need help ![]() ![]() Mod Edit: Pleas wrap you code in either of the following in order to preserve whitespace (indentation) and to highlight the syntax.
|
Author: | Zren [ Wed Nov 28, 2012 10:15 pm ] |
Post subject: | RE:hi i need help in turing programming. how to do between programing |
"how to do between programing" ... I'm sorry, what was the question? |
Author: | Panphobia [ Wed Nov 28, 2012 10:16 pm ] |
Post subject: | RE:hi i need help in turing programming. how to do between programing |
and what do you need help with? |
Author: | AntoxicatedDevil78 [ Thu Nov 29, 2012 10:34 am ] |
Post subject: | Re: hi i need help in turing programming. how to do between programing |
State you Problem? |
Author: | Zren [ Thu Nov 29, 2012 11:37 am ] | ||||
Post subject: | RE:hi i need help in turing programming. how to do between programing | ||||
So apparently reading your whole post for context was a good idea. You know that to find a number above 3, you use the x > 3 relation operator? You should also know if a number is greater or equal to 3, you'd use x >= 3. The above statements will return true if their statements are correct. Eg:
Another tool you have at your disposal is Logical/Conditional operators. More specifically, the AND operator.
Note that this was an example of a Truth Table (https://en.wikipedia.org/wiki/Truth_table#Logical_conjunction). Now the actual problem. First lets breakdown the problem into smaller , solvable, problems. Rewording the problem tends to help. > Count only the number of students eligible for supplemental exams(mark between 40 and 49). Count only the number of students that have marks between 40 and 49. You should have notes on how to make a counter. If not, ask. The second sub-problem is what you're asking about. How do you find out if a number is in the range of 40 .. 49? How do you find a number above 40? How do you find a number below 49? How do you find a number that solves both conditions at once? |