Sitenotice:
2020: NameSpaces are going to be implemented this year to better separate content. OS-9 Al (talk) 11:18, 15 April 2020 (CDT)
2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

Program Quickie

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
WELCOME
Looking for CoCo help? If you are trying to do something with your old Color Computer, read this quick reference. Want to contribute to this wiki? Be sure to read this first. This CoCo wiki project was started on October 29, 2004. --OS-9 Al

See Recent Changes. | About this site. | Join the E-Mail List or Facebook Group. | Contact me with updates/questions.

This page was last updated on 05/3/2019. Total Pages: 681. Total Files: 956.


Home / Publications / Rainbow / Rainbow 1981 / Rainbow 1981-10 - Program Quickie


Here we begin a new feature, somewhat patterned after "MAD" magazine's famous "various places around the magazine". We hope PROGRAM QUICKIES will provide some help with short little programs for small functions that you may not have thought about -- or may not have even needed -- until now!)


One of the things it is always helpful to be able to find is the percent change (formally, the delta percent) of two numbers. here is a short little program that does just this:

10 INPUT "OLD NUMBER";X1
20 INPUT "NEW NUMBER";X2
30 DP=((X2-X1)/X1)*100
40 PRINTUSING "###.##";DP;: PRINT "% CHANGE"

Links

See this article as it appeared in the magazine, in Archive.org