answersLogoWhite

0

I was able to create a login program in qbasic with this simple code:

cls

1 input "Username: " , username$

if username$ <> "Define what you want your name to be here (use the quotes)" then goto 1

else input "Password: " , password$

if password$ <> "Again define using quotes" then goto 1 else print "You have successfully logged in!"

Hope this helps!

===

I would have rewritten the above code...-without using outdated line numbers/being combined together with goto statements-...as being the following...

'*** set username/password...

userName$="abc"

passWord$="123"

'*** get username/password

DO

CLS

PRINT "Log in..."

PRINT

INPUT "Username: ", guessUserName$

INPUT "Password: ", guessPassWord$

LOOP UNTIL guessUserName$=userName$ AND guessPassWord$=passWord$

'*** print welcome screen...

CLS

PRINT TIME$ + " " + DATE$

PRINT

PRINT "Congratulations, "; userName$; ", you have successfully logged in!"

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What extension would a file saved in Qbasic have?

the extensions of qbasic are that, there are only 80 pixels to write in the qbasic


Who created the calculator?

Willim Seward Burroughs was the first to create a working calculator.


Why are rem statements important in qbasic programming?

qbasic is important because its technology


Why did Pascal create the first calculator in 1645?

nose


What are the difference between gwbasic and qbasic?

Difference between QBASIC and GWBASIC?


What is the shortcut key for input statement in QBasic?

There is no shortcut key of input in qbasic


What are the different types of operators in QBASIC?

The different types of operators in QBASIC are:Arithmetic OperatorsRelational OperatorsLogical Operators


Why is QBasic called QuickBasic?

Qbasic and Quickbasic are not the same! Qbasic was a free interpreter that Microsoft included with MS-DOS. Although Quickbasic uses similar syntax as quickbasic it allows programs to be compiled.


Who found QBASIC?

microsoft


Advantage of qbasic?

The advantage of qbasic is that it is easy to learn, to start out,then one can move on to more complex, or advanced languages.


Do you need statement numbers in QBASIC?

Statement numbers were a feature of BASIC, and while QBASIC supports them, they are by no means necessary.


What characteristics in quickbasic?

CHOICE OF EITHER 32 BIT/OR ELSE, 64 BIT QBASIC PROGRAM VERSIONS There are both 32 bit/64 bit QBASIC program versions. You have to select which is the correct version that will run on your own operating system. For example,... -&gt; Windows 95/98/XP, runs the 32 bit version(s) -&gt; Windows 7 runs the 64 bit version CHOICE OF EITHER QBASIC 'INTERPRETER'/OR ELSE, 'COMPILER' VERSIONS QBASIC Version 1.1 was the original version; however, it is 'interpreter' only. This means you CANNOT use it to create stand alone [.exe]cutable files with. QBASIC Version 4.5 is a 'compiler' version; which CAN be used to create stand alone [.exe]cutable files with. QB64 is the 64 bit 'compiler' version which runs on 64 bit platforms; it can also be used to create stand alone [.exe]cutable files with.