diff --git a/education/software development/ECE1400/C.md b/education/software development/ECE1400/C.md index 12c4357..7df84ae 100644 --- a/education/software development/ECE1400/C.md +++ b/education/software development/ECE1400/C.md @@ -81,4 +81,8 @@ It will continue to read until it reaches a nondigit (whitespace is not skipped When asked to read a float, `scanf` searches for one of: - A plus sign or minus sign -- A series of digits (possibly containing a decimal point), followed by an exponent (optional). An exponent consists of the letter `e` or `E` \ No newline at end of file +- A series of digits (possibly containing a decimal point), followed by an exponent (optional). An exponent consists of the letter `e` or `E`, an optional sign, and one or more digits. +`%e`, `%f`, and `%g` all follow the same rules for recognizing floating point numbers. + +If an ordinary character is included in the pattern matching string, it will be matched then discarded before proceeding to the next character. + diff --git a/education/software development/ECE1400/Chapter 3 Exercises.md b/education/software development/ECE1400/Chapter 3 Exercises.md index a1031e5..43e7b1e 100644 --- a/education/software development/ECE1400/Chapter 3 Exercises.md +++ b/education/software development/ECE1400/Chapter 3 Exercises.md @@ -18,3 +18,13 @@ printf("%-6.0f", x); ``` # 3. +a. Equivalent +b. Equivalent +c. Equivalent +d. Equivalent + +# 4. +`i`: `10` +`x`: `5.0` +`j`: `6` +