Finding lowest number

Pages: 123
So google didn't help?
You see what i got. Only way with examples was arrays and now they don't even run righr
You see what i have kinda like a giant mess I have learned a lil about array but very little
cleaned up some of the errors but am not sure of this error never seen it before it is in the main(){
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include <iostream>

using namespace std;

double calcAvgScore(int score[5])
{
    int i, findLowest, findHighest; //i = counter
    double avg;


for (i = 0; i < 5; i++) {

//In first time
if (i == 0) {
findLowest = score[i];
findHighest = score[i];
}

//Get max
if (score[i] > findHighest) {
findHighest = score[i];
}

//Get max
if (score[i] < findLowest) {
findLowest = score[i];
}

//Sum
avg = avg + score[i];
}


int main()
{
    string name;
    int score[5], avg = 0, quit, minNum = 0, maxNum = 0;
    while (quit != 1)
{
    quit = 0;
         cout << " Enter student name: ";
         cin >> name;

    for (int x=0; x<1; x++)
    {
    cout << " Enter score: " << ++x ;
    cin >> score[5];
            if (score < 1 || score > 10)
         {
             cout << " Re-enter score (between 1 - 10)" << endl;
         }


             cout << " Enter 1 to quit or 0 to enter another: ";
             cin >> quit;
}
cout << " Your avg score is: " << avg << endl;
cout << " and min num is " <<  findLowest << endl;

}
   return 0;
}
You won't be able to finish your assignment for good :)
for good?
maybe you think I am a kid?
exactly!
Lol I am almost 50 maybe that is why I dont get or put up with smartass answers kid! :p
Here is what I have plz help with errors its almost there I feel.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
 #include <iostream>

using namespace std;

double calcAvgScore(double score[]);


int main()
{
    string name;
    double score[5];
    int avg = 0, quit, findLowest, findHighest;
    while (quit != 1)

    quit = 0;
         cout << " Enter student name: ";
         cin >> name;

    for (int x=0; x<1; x++)
    {
    cout << " Enter score 1: ";
    cin >> score[5];
            if (score[5] < 1 || score[5] > 10)
         {
             cout << " Re-enter score (between 1 - 10)" << endl;
         }


             cout << " Enter 1 to quit or 0 to enter another: ";
             cin >> quit;
}
cout << " Your avg score is: " << (score[5]) << endl;

calcAvgScore(score[5]);


   return 0;
}

double calcAvgScore(double score[], findLowest, findHighest)
{
    int i, findLowest, findHighest; //i = counter
    double avg;


for (i = 0; i < 5; i++) {

//In first time
if (i == 0) {
findLowest = score[i];
findHighest = score[i];
}

//Get max
if (score[i] > findHighest) {
findHighest = score[i];
return findHighest;
}

//Get max
if (score[i] < findLowest) {
findLowest = score[i];
returm findLowest;
}

//Sum
avg = avg + score[i];
}
Still can't get the format right (
closed account (48T7M4Gy)
Lol I am almost 50

So that means with a bit of luck you won't be around for much longer?

maybe that is why I dont get or put up with smartass answers kid! :p

No I think it is more likely you just haven't taken your medication. Remember, 2 red and 4 green 6 times a day and an injection 4 times a week.

Here is what I have plz help with errors its almost there I feel.

I've got a better idea. I feel you're done.

You're joking if you think good faith volunteers here who have given 1000's of ppl genuine help need to put up with crap from 1 or 2 like you who have an overwhelming sense of self importance and entitlement!
I have never saie
Last edited on
if your lil pink
Last edited on
want me to
Last edited on
closed account (48T7M4Gy)
Make that 8 red,16 green 12 times a day and a continuous intravenous drip at 2 gallons per minute. Should calm you down in a month or two. :)
find another reason
Last edited on
awaiting any reasonable response you may have keyboard boy
closed account (3h0oLyTq)
Hello, @miah612000
don't worry, i will always be with you :))
Run that key
Last edited on
closed account (48T7M4Gy)
I'm not the one reporting you miah.

Steady down or you'll tip up your trailer and frighten the piglets.

There are all sorts of people here and I don't think we need your style of lecture on respect.
Pages: 123