Write a program to assign the sequence number of a month and display the name of the month
and the number of days in the given month.
Example:
ASSIGNED VALUE: 5
OUTPUT
MAY – 31 DAYS
Answers
Answered by
0
Answer:
Program done in QBASIC
Explanation:
CLS
input "enter the number of the month"; N
if N=1 then print "JANUARY--31 DAYS"
if N=2 then print "FEBRUARY--28 DAYS"
if N=3 then print "MARCH--31 DAYS"
if N=4 then print "APRIL--30 DAYS"
if N=5 then print "MAY--31 DAYS"
if N=6 then print "JUNE--30 DAYS"
if N=7 then print "JULY--31 DAYS"
if N=8 then print "AUGUST--31 DAYS"
if N=9 then print "SEPTEMBER--30 DAYS"
if N=10 then print "OCTOBER--31 DAYS"
if N=11 then print "NOVEMBER--30 DAYS"
if N=12 then print "DECEMBER--31 DAYS"
END
Similar questions