Yes, it’s me. Yes, it’s been a while!
My last U of Px class was majorly frustrating! I loved trying to learn to write programs, but it would have been even better if we had someone teaching us! It was not unlike me handing my students the math book and saying “Here, be able to reduce fractions by Friday.”
At the end is the last computer program I wrote.
My big excitement at the moment is that I’m going to Mt. Horeb for Easter. We don’t get a real spring break, just Thursday, Friday, and Monday. Well, we do get the Saturday and Sunday off, too. But we don’t get a week. I debated with myself for a while, because I am going out this summer. So my first thought was just to wait. But heck. When I lived in the convent, we were only allowed one trip a year, and that was limited to visiting immediate family. (That explains my flying in and out of Phoenix when I came to Arizona in 1996). But I don’t live there any more. I get to make choices now, and if I want to go twice, I’m going twice! So I’ll go for a very brief weekend in April, and then go in the summer when I can also go see the folks in Jefferson. It helps that the trip is going to be inexpensive!
My computer is now happy. If you have ever had a computer conversation with me, it has included how much I hate Vista. Really. Despise it. Plus I have to spend a lot of time on the U of Px web site, but the program kept kicking me off. I think the program is HAL’s cousin, because it wouldn’t let me disable it. I was seriously thinking of getting a Mac, which shows how desperate I’d become. Now, instead, I have a different operating system. I’ve been through this before with a different computer, so first I moved all my music, docs, and photos to the external hard drive. I did that because I wasn’t going to partition my hard drive; Vista has no redeeming features at all, as far as I’m concerned. So now I have ubuntu instead of Vista and I’m a happy camper!
The last computer program (so far) that I wrote for my class:
/*Tax Calculator for Kudler Fine Foods*/
/*
Change Request #1\n
Requestor: Harvey Stephens\n
Modify the C program so that the user inputs the purchase amount. Check the user’s input for validity. In addition \n
to calculating the sales tax for each location, calculate and display the total sale amount for each location.*/
#include
#include
int main()
{
float price;/*int price[5] doesnt work; gives error message down in price times rate*/
int store;
float total;
float taxrate[3]={.0725, .075, .0775};/*I can’t get the rest of the program to care about this array!*/
float tax;
/*remove char c;
int done; */
/*version 3 = no totals! version 4 = separate store1, store2, store3 in input; version 5, put all three at end
version6 = eliminate store1, etc. , use version 7 — repeat if for bottom total price section*/
printf(“Be sure to greet the customer!\n\n”);/*double n gives an extra blank line*/
printf(“If your store in DelMar, type 1.\n”);
printf(“If your store in Encinitas, type 2.\n”);
printf(“If your store in LaJolla, type 3.\n”);
gets(store);
printf(“What is the total purchase amount?\n”);
gets(price);
if(atoi(price)<0) /*works for negative numbers, although the rest continues to print*/
{
printf(“Please enter the price again. Thank you!\n\n”);
}
/*version 3: try again with “if” command*/
if(store2)
{
tax = .0775*atoi(price);
printf(“LaJolla’s tax due is $%.2f.\n\n”,tax); /*double n gives an extra blank line*/
}
if(store2)
{
total = atoi(price)*1.0775;
printf(“LaJolla’s total due is $%.2f.\n\n\n”,total);
}
printf(“Thank you for shopping at Kudler Fine Foods today!\n”);
getch();
return(0);
}