Also, the GTF will hold two extra sessions in the lab during week 2 devoted to the same material covered in the week 1 lab. The times of these lab sessions will be announced in class and posted to the 122 email list so add your name to the list asap.
We are handling this informally. You do not have to use the DuckCall "exchange section" command (XS, 97) after it starts costing you $$ to do so. Here's what to do:
Go to the lab you want and ask the GTF if there's room for you. If your GTF says Yes, make sure that s/he has your name removed from your original lab and added to the new one. If the GTF says No, you will have to attend a different lab.
The emacs backup file If you accidentally destroy or remove a file you are working on, note that emacs automatically creates a backup file when you open a file. Emacs appends a '~' to the file name being edited; thus, the backup file for tempCon.cpp is tempCon.cpp~.
Emacs makes a backup for a file only the first time the file is saved in each editing session. No matter how many times you save a file in Emacs, its backup file continues to contain the contents from before you started the current emacs session.
If you damage or lose a file, simply open the backup file in emacs: "emacs tempCon.cpp~" and then write it out (cntrl-x cntrl-w) to the original name, tempCon.cpp (not tempCon.cpp~).
Cancel Command: cntrl-g. If you type an emacs command you did not intend, the results are often mysterious. You can cancel a running or partially typed command with cntrl-g. Some commands take two successive c-g's to terminate.
Redisplay the screen: cntrl-l ("el", not the digit "1"). If the data on the screen looks wrong, type cntrl-l.
const char NUL = '\0'; /* writeTime() ==================================== * displays time in digital watch format */ void writeTime(int hr, int min){ cout << endl << ((hr < 10)?'0':NUL) << hr << ":" << ((min < 10)?'0':NUL) << min << endl; }Note that this function is an exception to the general rule that functions do not use cout. Since the function is written specifically to perform output, it does use cout and the name of the function makes its purpose clear.
Algorithm dreverse prompt and read n reverse <- 0 //reverse the order of digits in n while (n > 0) reverse <- reverse * 10 // shift accumulator left digit <- n % 10 // copy rightmost digit of n reverse <- reverse + digit // add digit on right end n <- n / 10 // shift n right using INTEGER DIVISION od //display result print n, reverse End.