diff options
| author | Griffinwizard <[email protected]> | 2021-10-06 19:05:09 -0700 |
|---|---|---|
| committer | Griffinwizard <[email protected]> | 2021-10-06 19:05:09 -0700 |
| commit | 95cbab9c1b061f373f48a6c0e788ec5bdb656384 (patch) | |
| tree | f0dd5da188baa9434156e71b812f2a37ecec86ba /3a | |
| parent | 3a finished (diff) | |
| download | archived-cst116-lab2-jacobaknox-95cbab9c1b061f373f48a6c0e788ec5bdb656384.tar.xz archived-cst116-lab2-jacobaknox-95cbab9c1b061f373f48a6c0e788ec5bdb656384.zip | |
rearranged files
Diffstat (limited to '3a')
| -rw-r--r-- | 3a/4.1Exercises.txt | 7 | ||||
| -rw-r--r-- | 3a/4.3Exercies.txt | 16 | ||||
| -rw-r--r-- | 3a/6.1Exercies.txt | 8 |
3 files changed, 31 insertions, 0 deletions
diff --git a/3a/4.1Exercises.txt b/3a/4.1Exercises.txt new file mode 100644 index 0000000..38e9589 --- /dev/null +++ b/3a/4.1Exercises.txt @@ -0,0 +1,7 @@ +1. -12.34 numeric +2. 'Hello' illegal +3. "F" String +4. "1234" String +5. '1' Character +6. A illegal +7. "Marcus' illegal
\ No newline at end of file diff --git a/3a/4.3Exercies.txt b/3a/4.3Exercies.txt new file mode 100644 index 0000000..a4f5979 --- /dev/null +++ b/3a/4.3Exercies.txt @@ -0,0 +1,16 @@ +3. +a. int a, int b; + There should not be a second "int" after the comma +b. int a = b; + int b = 0; + A cannot be assigned the value b before be is declared +c. int a = 0, b = 3.5; + b is not an int +d. char grade = "A"; + '"A"' is a string not a char +e. char c = 1; + 1 is a numerical value not a char +f. int a, b, c, d, f; + No error +g. char x = "This is a test."; + '"This is a test."' is a string not a char
\ No newline at end of file diff --git a/3a/6.1Exercies.txt b/3a/6.1Exercies.txt new file mode 100644 index 0000000..2d754cd --- /dev/null +++ b/3a/6.1Exercies.txt @@ -0,0 +1,8 @@ +1. y = 5x + 1; + valid statement +2. x^2 + 2x + 1 = 0; + invalid assignment can only be done on a lone variable to the left of an = +3. x = 5 * a + 4; + valid statement +4. 0 = -15 * b; + invalid variable names cannot be numerical literals
\ No newline at end of file |