none
How to count marks over 100 ?

    Question

  • Hi there, first time posting and require a bit of help. I'm currently looking to create a program that will read a list of names and marks from an excel sheet (which I have done) but does anyone know the code or a rough idea as to how to count how many people scored over 100 ? and display that ? thanks.
    Wednesday, January 18, 2017 5:08 PM

All replies

  • Hello Scott, 

    Many persons know the answer to your question. 

    However, it is likewise with a carpenter, we don't know what tool you use. 

    Possibilities if it is Visual Studio General: Visual Basic for .Net, C# but also Visual Basic For Application have forums in this category.


    Success
    Cor

    Wednesday, January 18, 2017 5:51 PM
  • Hi Cor, it is Visual Basic 2015 application I am using. Basically the question I need to complete is "count the number of students who score over 100/150". I know it's fairly vague but any help would be appreciated 

    Wednesday, January 18, 2017 5:59 PM
  • Anything wrong with counting them manually?

    count = 0

    for each student

       if student.mark > 100

          count = count + 1

    (the above is pseudo-code)


    Wednesday, January 18, 2017 8:14 PM
  • ScottJ1592845, I'm sure you are aware that we don't help with homework, and certainly this question is typical of homework assignments. Wyck believes the same thing, since he is illustrating how to solve this problem with pseudocode. However, it is up to you as a new programmer to try to make the first effort. If you get stuck, show us your code and describe where you are having problems.
    Wednesday, January 18, 2017 8:23 PM
  • Hi friend,

    Could Wyck's idea help you out? Please feel free to mark a reply as answer if it has resolved your doubts. Thanks for your understanding and cooperation:)

    Best regards, 

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, January 19, 2017 1:03 PM