Yahoo! Groups Tomy Tutor Mailing List | Thread index | Back to the main page

Sample Tomy Tutor BASIC Program - 30 Days Hath September

Previous by date | Next by date

Return-Path: <benjamin.marioe1@...>
X-Sender: benjamin.marioe1@...
X-Apparently-To: tomytutor@yahoogroups.com
X-Received: (qmail 60914 invoked from network); 26 Mar 2010 08:53:55 -0000
X-Received: from unknown (98.137.34.45)
by m3.grp.sp2.yahoo.com with QMQP; 26 Mar 2010 08:53:55 -0000
X-Received: from unknown (HELO n37b.bullet.mail.sp1.yahoo.com) (66.163.168.151)
by mta2.grp.sp2.yahoo.com with SMTP; 26 Mar 2010 08:53:55 -0000
X-Received: from [69.147.65.173] by n37.bullet.mail.sp1.yahoo.com with NNFMP; 26 Mar 2010 08:50:06 -0000
X-Received: from [98.137.34.184] by t15.bullet.mail.sp1.yahoo.com with NNFMP; 26 Mar 2010 08:50:06 -0000
Date: Fri, 26 Mar 2010 08:50:05 -0000
To: tomytutor@yahoogroups.com
Message-ID: <hohsft+chek@...>
User-Agent: eGroups-EW/0.82
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Yahoo Groups Message Poster
X-Yahoo-Newman-Property: groups-compose
X-eGroups-Msg-Info: 1:6:0:0:0
From: "Mario" <benjamin.marioe1@...>
Subject: Sample Tomy Tutor BASIC Program - 30 Days Hath September
X-Yahoo-Group-Post: member; u=332781085; y=TTqg5LT5SGbiyBS4Fkvcv9_4WXCiiWHnAsxu0-Teblm2NTLbILJdd7t6oA
X-Yahoo-Profile: classictvman1981

TOMY TUTOR SAMPLE BASIC PROGRAM:

30 DAYS HATH SEPTEMBER

There is a simple poem to help you remember the number of days in any month:

Thirty days hath September,
April, June and November.
All the rest have thirty-one.
Except February alone.
Which has four plus twenty-four.
And every leap year one day more.

This program will also help you - unless it's a leap year!

10 INPUT "TYPE IN THE MONTH NUMBER (1-12):" :M
20 IF M>12 THEN 10
30 PRINT "MONTH NUMBER ";M;" HAS ";
40 ON M GOTO 70,90,70,50,70,50,70,70,50,70,50,70
50 PRINT 30;
60 GOTO 100
70 PRINT 31;
80 GOTO 100
90 PRINT 28;
100 PRINT " DAYS."
110 END

For fun, add a warning message when M=2 that "February sometimes has 29 days."

~Ben




Previous by date | Next by date


Thread index | Back to the main page