Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

This is GW-Basic program what will be the correct answer or write correct program for me?

Write a program that does the following three things.

 Asks “What year will you graduate?”

 Asks “What years is it now?”

 Prints a sentence that tells how many years of school you have left.

3 Answers

Relevance
  • 8 years ago
    Favorite Answer

    INPUT "What year will you graduate"; graduation_year

    INPUT "What year is it now"; current_year

    years_left = graduation_year - current_year

    PRINT "You have ";years_left;" years left before you graduate"

    Hope this helps!

  • 8 years ago

    There's a thing called book. Read it. If you can't do something that trivial by yourself, you will never understand advanced concepts.

    If you don't have a GWBasic or BASICA book, use QuickBasic, which has a great help (although many commands won't work in GWBasic). QBasic help screens are mediocre, too little content.

  • 8 years ago

    10 INPUT "What year will you graduate"; GRADYEAR

    20 INPUT "What year is it now"; THISYEAR

    30 YRSLEFT = GRADYEAR - THISYEAR

    40 PRINT "You have";YRSLEFT;"year";

    50 IF YRSLEFT > 1 THEN PRINT "s";

    60 PRINT " of school left to do."

Still have questions? Get your answers by asking now.