Ask Question Forum:
Model Library:2025-02-08 Updated:A.I. model is online for auto reply question page
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by hankknight
at 2024-11-15 05:21:27
Point:500 Replies:3 POST_ID:828790USER_ID:11403
Topic:
Linux;;Shell Scripting
How can I add x and y? This does not work:
Expert: duncanb7 replied at 2024-11-15 05:35:32
woolmilkporc, you are faster than me in 17 seconds to get the final answer,
Assisted Solution
Expert: duncanb7 replied at 2024-11-15 05:29:52
100 points EXCELLENT
x=1
y=2
echo $((x+y))
it should be with $(( ...))
y=2
echo $((x+y))
it should be with $(( ...))
Accepted Solution
Expert: woolmilkporc replied at 2024-11-15 05:29:35
400 points EXCELLENT
POSIX format:
echo $((x+y))
The old "expr" style:
echo `expr $x + $y`
Using the calculator "bc":
echo "$x + $y" | bc
echo $((x+y))
The old "expr" style:
echo `expr $x + $y`
Using the calculator "bc":
echo "$x + $y" | bc