Are you a Minor or Adult Program

I have made a program that tells whether you are a minor or adult
Here is the link

2 Likes

Language: Made with QBasic

2 Likes

Looks cool!
image

Is QBasic different from Basic? If so, I’ve never heard of it. However, at least in the U.S., it’s easy to tell: <18 is minor and >=18 is adult.

2 Likes

Well you mean 0<18 …

PRINT "This program find whether you are MINOR or ADULT"
CLS
M$ = "Minor" : A$ = "Adult"
PRINT "Enter your age"
INPUT age
IF age < 18 THEN
	PRINT M$
ELSE
	PRINT A$
END IF
END

Why do you print a title just to clear it?

To be honest he/she/they/… is/are posting lot of basic stuff almost as if to racket stats for the leader-board … another obsessed competitive like @anon40284853 …??

I think so. They didn’t really follow the guidelines of #general:showcase XD. And not to be rude, but this IS just a basic QBasic program (I don’t know any Basic or QBasic so I might be wrong here).

1 Like

There was basic, then they made quick basic to simplify things, then they made Qbasic to make a simplified simplified basic …

This is why Python is better: one line.

print("Minor" if int(input("This program find whether you are MINOR or ADULT\nEnter your age\n")) < 18 else "Adult")
1 Like

Remember age 0 or negative … not a minor but a ghost.

3 Likes

Was basic supposed to be simple to start?

Can you use elif in this as well? (I was always curious how these were done)

No. You could put if/else statements inside the else statement though IIRC. I know you can for lambda. It’s really cool to see an entire program in one line with lambda. @Totovim can do that.

basic was simple, but i guess for some not so simple :slight_smile:

Interesting. It works.

It turns the string into a number and no is more than 18

1 Like

Apparently inputting any string will say you’re an adult :stuck_out_tongue:

2 Likes

How to break it:

Type your age with letters ie. Thirteen
Then it breaks it lol. You are saying you are thirteen yet it calls you an adult because of the weird string thing.

image

3 Likes

all ascii numbers in most low-level programming languages are converted to integers see ascii chart

1 Like