How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Ray Atkinson Your Own Question

Ray Atkinson
Ray Atkinson, Graduate Student
Category: Homework
Satisfied Customers: 1787
Experience:  Degrees in Math, Education and Accounting, years and years of tutoring.
29937297
Type Your Homework Question Here...
Ray Atkinson is online now
A new question is answered every 9 seconds

Create a QBasic program that a numeric value and return the

Resolved Question:

Create a QBasic program that a numeric value and return the number of thousand,hundred,tens and units it contained.
the numeric value entered must be between 0 and 99999 inclusive.
Submitted: 1 year ago.
Category: Homework
Expert:  Ray Atkinson replied 1 year ago.

Ray Atkinson :

I want to make sure I understand. You want to have the user input a number and have the program return the number of thousands, the number of hundreds, the number of tens, and the number of ones?

Customer:

so please work out an example for me. let say:

Customer:

INPUT:12000

Customer:

OUTPUT:

Customer:

Thousand: 12

Customer:

how wilthe program look like?

Ray Atkinson :

Do you want it to say "Hunderds: 0" or suppress it?

Ray Atkinson :

should it catch if the number is XXXXX an integer?

Customer:

pls both if u don't mind

Ray Atkinson :

Not a problem.

Ray Atkinson :

Do you want me to explain the run of the program, or just type it up?\

Customer:

type it then explain

Ray Atkinson :

Ok, give me a couple minutes, and I will type up a word file.

Customer:

ok i will be waiting

Ray Atkinson :

start: Input x


if x<0 or x>99999 or x<>int(x) then goto start


q=int(x/1000): if q>0 then print “Thousands:”; q: x=x-1000*q


q=int(x/100): if q>0 then print “Hundreds:”;q: x=x-100*q


q= int(x/10): if >0 then print “Tens:”; q: x=x-10*q


if x>0 then print “Ones:”; x

Ray Atkinson :

The first line puts a label and asks for input

Customer:

ok

Ray Atkinson :

the second catches negative number, numbers that are too large, and non-integers

Ray Atkinson :

the next line calls the number of thousands Q and prints how many there are, and reduces x by that many thousands.

Ray Atkinson :

the next lines do the same for hundreds, tens, and ones.

Ray Atkinson :

oops. I missed a q on the "tens" line.

Customer:

ok

Ray Atkinson :

I'm sure you can make it look fancier with a message of some kind on line 2 and some more wording with the messages, of you wanted.

Ray Atkinson :

You also probably want a better prompt for the user than just a ? for them to input the number.

Customer:

ok so basically am am i doing a division operation?

Ray Atkinson :

I just gave the skeleton on the program.

Customer:

yeah i konw

Ray Atkinson :

"int" returns the integer of a division problem.

Customer:

thanks let me work my way around it and get back to u should i not get something.

Ray Atkinson :

If you start with a number like 14358, the first line divides that by 1000, gets 14.358 and int makes it 14.

Ray Atkinson :

it prints the 14, and then takes 14*1000 away from x, so 14358-14000=358

Ray Atkinson :

Hmmm. You don't want it to say that there are 143 hundreds in that example, so you?

Ray Atkinson :

You want 14 thousands, 3 hundred, 5 tens, and 8 ones, right?

Customer:

yes

Ray Atkinson :

oh, good. I w2as afraid I misunderstood.

Ray Atkinson :

I will be here most of the day if you have any questions. When you are satisfied, please remember to rate my answer.

Customer:

so x is what the person will input right

Ray Atkinson :

yes.

Ray Atkinson, Graduate Student
Category: Homework
Satisfied Customers: 1787
Experience: Degrees in Math, Education and Accounting, years and years of tutoring.
Ray Atkinson and other Homework Specialists are ready to help you
Expert:  Ray Atkinson replied 1 year ago.
Can you not see the solution above?
Expert:  Ray Atkinson replied 1 year ago.

start: Input x

if x<0 or x>99999 or x<>int(x) then goto start

q=int(x/1000): if q>0 then print "Thousands:"; q: x=x-1000*q

q=int(x/100): if q>0 then print "Hundreds:";q: x=x-100*q

q= int(x/10): if >0 then print "Tens:"; q: x=x-10*q

if x>0 then print "Ones:"; x

Customer: replied 1 year ago.

thanks so much


 

Expert:  Ray Atkinson replied 1 year ago.
You are quite welcome. I'm glad I could help.
Customer: replied 1 year ago.

hi good day


 

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience