🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #107

Re: Problematic Program

#107
From: Sleek
Date: Mon, 21 Oct 2002 03:32
26 lines
1809 bytes
"CM" <mckenzie992@comcast.net> wrote in message news:<ESudnc40b4i4hS6gXTWcow@comcast.com>...

> for (j=0;j=noOfGrades-1;j++)
> {
> cout<<"\t\nGrade #"<<j+1<<": ";
> cin>>Grades[i][j];
> if (Grades[i][j] >= 0  && Grades[i][j] <= 59)
> points+=0;
> if (Grades[i][j] >= 60 && Grades[i][j] <= 64)
> points+=1.0;
> if (Grades[i][j] >= 65 && Grades[i][j] <= 69)
> points+=1.5;
> if (Grades[i][j] >= 70 && Grades[i][j] <= 74)
> points+=2.0;
> if (Grades[i][j] >= 75 && Grades[i][j] <= 79)
> points+=2.5;
> if (Grades[i][j] >= 80 && Grades[i][j] <= 84)
> points+=3.0;
> if (Grades[i][j] >= 85 && Grades[i][j] <= 89)
> points+=3.5;
> else
> points+=4.0;
> }

You need 1 if statement (the first one) ... one else statement (the
last one) .. everything inbetween should be "else if"
Technical Details
Message-ID: <84654e56.0210201932.671b8a43@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
References: <ESudnc40b4i4hS6gXTWcow@comcast.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,635d58b7486c58ea
X-Google-Attributes: gid109fba,public
X-Google-Thread: 10d4ba,635d58b7486c58ea
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: 114592,635d58b7486c58ea
X-Google-Attributes: gid114592,public
X-Google-ArrivalTime: 2002-10-20 20:32:23 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: sleek@crapmail.com (Sleek)
Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++
Subject: Re: Problematic Program
Date: 20 Oct 2002 20:32:22 -0700
Organization: http://groups.google.com/
Lines: 26
Message-ID: <84654e56.0210201932.671b8a43@posting.google.com>
References: <ESudnc40b4i4hS6gXTWcow@comcast.com>
NNTP-Posting-Host: 24.208.179.190
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1035171143 27775 127.0.0.1 (21 Oct 2002 03:32:23 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 21 Oct 2002 03:32:23 GMT