prof m's c++ site
Fall 2011
Friday, October 14, 2011
Newlines
It isn't necessary to write multiple cout statements when you want a line break. This code
cout << endl;
cout << "Your random # is " << num << "." << endl;
cout << endl;
could be rewritten using the newline character, \n
cout << "\nYour random # is " << num << ".\n"
<< endl;
These two code snippets generate the same output:
Newer Post
Older Post
Home
Contacting Professor Mayo
Please
do not
attempt to leave voice messages with the college's phone system: the voice mailboxes are limited in size and fill quickly.
The best way to contact Professor Mayo is via
Brookdale email
.
You
must
use your Brookdale email address for all communications -
this includes submitting homework and lab assignments.
Please be warned that if I receive email from non-Brookdale email addresses, I will not respond.
Labels
a- or higher
(1)
admin
(8)
algorithms
(1)
b- or higher
(2)
deliverables
(24)
docs
(1)
documents
(1)
email
(1)
exams
(18)
homework
(17)
humor
(4)
integrated development environment
(2)
lab assignments
(17)
prep
(11)
psa
(15)
quizzes
(1)
reading
(8)
results
(5)
source code
(9)
tools
(1)
tutorials
(7)
webadvisor
(3)
Blog Archive
▼
2011
(72)
►
December
(12)
►
November
(17)
▼
October
(43)
Lab 11 - circle calculations
Homework 4 - is vowel
Lab 6 - reverse digits function
Exam #1 results
Exam #1 source code
Exam #1 short answers
Reading assignment - chapter 6
Whitespace... it's free!
Exam #1 programming problems
Exam #1 pretest results
Exam #1 pretest comments - part the second
Exam #1 pretest comments - part the first
Exam #1 preparation
Elaine Lapham Memorial Scholarship
WebAdvisor - interval 3
Homework 3 - guess
Public service announcement #2
Newlines
Homework 2 - random number - alternate input ...
Brookdale 5K
Quiz #1 - results
Enhanced telephone digits
rand() and srand()
Lab 5 - reverse digits
Lab 4 - Cartesian coordinate system
Lab 3 - salary increases
Lab 2 - miles per gallon program
Lab 1 - miles per gallon algorithm
Grades
Homework 2 - random number
Reading assignment - chapter 5
Code submission
Just say no to "magic numbers"
Homework 1 - days in month
Deliverables
Grades
Line numbers
Dev-C++ IDE
Public service announcement #1
Reading assignment - chapter 4
Required textbook
Deadlines
Main computer lab