COM SCI 31 Lecture 3: wk 1 Lecture 3

18 views3 pages
11 Apr 2017
School

Document Summary

#include using namespace std; int main() cout << hello << endl; function called main . Machine runs the translation of c++ code output destination is cout (show up on the screen) << : something we want to write out endl: new line language in the library sometimes is not part of the machine language e. g. cout, endl, so need to say it. #include overtime different companies develop different libraries for different uses, whose name might conflict -> use std::cout ( fullname ; std is like family name) so using namespace std;for convenience. . 52 will be withheld case matters: cout space & line are optional don"t run two words together be reasonable (for computer & human) Work incrementally if want a space before curser, add space inside . 14/5 -> 2 integer divided by integer drops any fraction in the answer. 14%5 -> 4 pagenumber % 2 (even number)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents