Program that averages specified number of tests

This is a discussion on Program that averages specified number of tests within the C++ Programming forums, part of the General Programming Boards category; I sort of understand but I can't quite figure it out. Somewhat like this... have to do a for loop ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    2

    Program that averages specified number of tests

    I sort of understand but I can't quite figure it out.
    Somewhat like this...
    have to do a for loop for how many times they say
    Code:
    #include <iostream.h>
    #include <stdlib.h>
    
    void main () *might be int main but my thing works with void*
    {
    int numtest;sumtest *don't know how to use it*
    double avg;
    
    cout <<"Enter number of tests"<<endl;
    cin >>numtest;
    {
    for (i=????; i >=1; --)
    {
    cout <<"Insert score"<<endl;
    *Here is where it is supposed to loop ^ how many times they wanted*
    {
    avg=(score+???????)/numtest
    }
    }
    }
    }
    cout <<"You have A, B, C, D, or F as grade"<<endl;
    Last edited by Fatal; 11-01-2005 at 01:59 PM.

  2. #2
    Bioport Productions
    Join Date
    Oct 2005
    Posts
    215
    hmm, wow. Have you tried to read some tutorials? You said yourself you don't know how to use it..HELP ME HELP YOU
    -"What we wish, we readily believe, and what we ourselves think, we imagine others think also."
    PHP Code:
    sadf 

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    2
    Im in computer math...? Is it that bad, because we're using Turbo c for dos ide(ancient) I can't figure out the logic, thats the problem, not the code.
    Last edited by Fatal; 11-01-2005 at 02:21 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Client-server system with input from separate program
    By robot-ic in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-16-2009, 02:30 PM
  3. Random number + guessing game trouble
    By Ravens'sWrath in forum C Programming
    Replies: 16
    Last Post: 05-08-2007, 03:33 AM
  4. Making a program take a variable number of arguments
    By subtled in forum C Programming
    Replies: 1
    Last Post: 04-17-2007, 05:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21