CIS 1057 Chapter 3: CIS 1057 Chapter 3.2
49 views3 pages
30 Oct 2018
School
Department
Course
Professor
Document Summary
At least one black space is required between words in a program, but additional are ignored by the compiler. Using extra spaces can help make code more readable, which is important. Comments make code easier to understand, and are part of program documentation (information that enhances program readability) Explain algorithms before each step is implemented. Programs should start with a header to give information about the program, including: Computes the integral part of the result of dividing the first operand by the second. Dividing by a negative integer has varying results by the compiler. Computes the integer remainder of the result of dividing the first operand by the second. Mod by a negative value varies by compiler. Data type of an expression depends on operands. If both values are integers, the data type of the expression is int. Else, the data type is a double. A data type with operands of different types is a mixed-type expression.