Update README.md
Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
parent
bd29bc7422
commit
8cf0b7dbe9
1 changed files with 18 additions and 1 deletions
|
@ -23,7 +23,7 @@ This program does nothing.
|
||||||
</pre>
|
</pre>
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
## Most a+b=c program
|
## a+b=c
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
<pre class="mermaid">
|
<pre class="mermaid">
|
||||||
|
@ -39,3 +39,20 @@ b=1
|
||||||
c=a+b
|
c=a+b
|
||||||
print(c)
|
print(c)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## a+b=c with input from user
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
<pre class="mermaid">
|
||||||
|
flowchart TD
|
||||||
|
start([Start]) --> inputa[/"Input integer a"/] --> inputb[/"Input integer b"/] --> add("c ← a+b") --> printc[/"print c"/] -->stop([Stop])
|
||||||
|
</pre>
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
In Python:
|
||||||
|
```python
|
||||||
|
a = int(input())
|
||||||
|
b = int(input())
|
||||||
|
c = a + b
|
||||||
|
print(c)
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue