CSC 2110 Lecture Notes - Lecture 1: Supreme Headquarters Allied Powers Europe, Include Directive, Input Device

20 views3 pages

Document Summary

I/o: sequence of bytes (stream of bytes) from source to destination: bytes are usually characters, unless program requires other types of info, stream, sequence of characters from source to destination. The program outputs a message indicating whether the number is positive, negative, or zero. Lab 01: use relational and logical operators, form and evaluate logical expressions with boolean operators. Use control structures: q1, write a program to calculate the area of a rectangle based on the length and width provided as input by the user. After calculating the area, display a message to the user indicating whether or not the rectangle is a square. #include // header to receive data from keyboard and send output to the screen using namespace std; //declare variables with double double width, length, area; //ask for input cout << "enter the length and width space separated:"; //formatted output cout << "the area is " << area << endl;

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents