SimCom  the Simple Computer

2

Let's try something a bit more useful. How about a program to add two numbers together? First the steps in our language:

  1. get a number;
  2. get another number;
  3. add the two together;
  4. output the result.
Pretty easy huh? Here we go then: Does it work?

Your turn - write a program which inputs one number and outputs it's double. For example, if 7 goes in, 14 comes out. Check.

[Contents] [Previous] [Next] [SimCom] [Help]