Ron's Brain

Dale's Feed and Farm Supply
Message Forums : Coder's Corner : josh is a loser
2 total messages. For real this time.
Bohrium
10/22/2004 @ 12:49:43 EDT

My students are better coders than josh :)

Have you gotten to loops yet?

Hydrogen
10/22/2004 @ 13:47:16 EDT

You're supposed to be posting code here.


#include <iostream>
#include "coders.h"

using namespace std;

int main()
{
CCoder * josh, * students[150];
int i;
int betterStudents = 0;
int worseStudents = 0;

josh = new CCoder("Josh", 4);
loadStudentCoders(students);

for(i = 0; i < 150; i++)
{
if(students[i]->getAbility() > josh->getAbility())
betterStudents++;
if(students[i]->getAbility() < josh->getAbility())
worseStudents++;
}

cout << "There are " << betterStudents << " better students than Josh." << endl;
cout << "There are " << worseStudents << " worse students than Josh.";

exit(0);
}

Recent users
Logged on users that have pretended to enjoy this site within the last five minutes
There are no logged on users. How sad!