C++ Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Will Wood
    Evil Monkey
    • May 2002
    • 3475

    #1

    C++ Help

    Teacher said we could use any resources nessessary for this assignment..
    Considering I have about 10 pages of stuff to write, a speech to prepare, and a test to study for... I need AO's help on this one!
    And no I don't want the answer.. I need to know how to do it.. on a basic level. Like no crazy advanced stuff that can be done easily.


    Aight here's the problem:

    With a list of inputed numbers numbers, make the program find and output the min number, numbers greater or equal to 70, and the average..

    And I'm completely new and stupid of C++ and this is due tomarow, along with a test. so I'm trying to get this out of the way. Luckily, knowledge required to program this won't be on the test, it's more of a factual test, and writting only one simple program.

    Program will end when a negative number is inputed

    What I got so far (Yes lots of stuff is missing, but is what I have so far OK for what I need to be done? )

    Code:
    
    #include "stdafx.h"
    #include <iostream>
    using namespace std;
    int main()
    {
    int min, num70, avg, num;
    num70 = 0;
    cout << "Enter in your list of numbers (Seperate by a ',')";
    cin >> num;
    while(num>0);
    {
    
    
    }
    while(num>=70);
    {
    num = num70 + 1;
    }
    
    return 0;
    }
  • Vash02
    Shut your face
    • May 2002
    • 671

    #2
    Yuck, never liked C++. anywho...looks like what you have so far is alright. I cant help you with the rest of it cause,well, i forgot how to do it. Sorry!

    Comment

    • Kevmaster
      Owners Group Div: Director
      • Oct 2001
      • 5475

      #3
      you'll need to use a vector or an array to do it...do you know how to do those?

      Comment

      • Will Wood
        Evil Monkey
        • May 2002
        • 3475

        #4
        Yea, I've gotten about 10 people telling me to use an array. We havn't gone over that yet.

        The list of numbers is already given, if it make any difference.

        We're going over if and while statements, so it should be done only using that...

        Comment

        Working...