I've been reading Margaret's Belgium LiveJornal (
me_in_belgium ) beaucoup recently. I'm finding that we're having a lot of similar experiences (e.g. people openly smoking at school, freedom around town, having lots of schoolwork). I don't know how she's having time to write so much, though. I'm usually busy all day now, hence my lack of updating. Her français is probably much better than mine by now, however.
My proficiency in COMPUTER LANGUAGES is improving, on the other hand! I'm having a great time programming in C++, and have found that my small work using HTML with LiveJournal (such as using italics, bold print, or underlining things) has put me in the right frame of mine to figure out C++. Here's a small program I wrote:
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#include
using namespace std;
int main()
{
int COUNTDOWN = 10, NUMBER_COUNT = 0, POS = 0, NONPOS = 0,
POS_COUNT = 0, NONPOS_COUNT = 0, TOTAL;
double AVEPOS = 0.00, AVENONPOS = 0.00, AVEALL;
cout << "This program reads in ten whole numbers and computes\n"
"the sum of all positive numbers, all non-positive numbers,\n"
"and the sum of all the numbers entered. It also computes the\n"
"averages of all the positive numbers, all the non-positive\n"
"numbers, and the average of all the numbers entered.\n";
while (COUNTDOWN > 0)
{
int NUMBER_INPUT = 0;
NUMBER_COUNT++;
if (NUMBER_COUNT == 1)
cout << "Enter first number: ";
else
cout << "Enter next number: "
cin >> NUMBER_INPUT
if (NUMBER_INPUT > 0)
{POS = POS + NUMBER_INPUT;
POS_COUNT++;}
else
{NONPOS = NONPOS + NUMBER_INPUT;
NONPOS_COUNT++;}
cout << endl;
COUNTDOWN--;
}
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
TOTAL = POS + NONPOS;
AVEPOS = static_cast(POS)/POS_COUNT;
AVENONPOS = static_cast(NONPOS)/NONPOS_COUNT;
AVEALL = static_cast(TOTAL)/NUMBER_COUNT;
cout << "The sum of all the positive numbers is " << POS << endl <<
"The sum of all the non-positive numbers is " << NONPOS << endl <<
"The sum of all the numbers is " << TOTAL << endl <<
"The average of all the positive numbers is " << AVEPOS << endl <<
"The average of all the non-positive numbers is " << AVENONPOS << endl <<
"The average of all the numbers entered is " << AVEALL << endl << endl;
return 0;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
This doesn't look exactly right. The program we use to do this allows indentation to make it easier to read, and LiveJournal doesn't indent anything, even if you tell it to. The actual software I have isn't written in Comic Sans MS font, either. But there's a basic idea of what I'm doing. This program was a rather easy one designed to get all kinds of sums and averages from ten numbers that are imputed by the user. It's a lot of fun, really.
Now I've got to do a few things, among which are reading many pages of an awesome book my Native American lit class is reading, putting up a few posters for the Wind Ensemble concert at Charlie's this Saturday, and organizing myself for this week.
Peace--