To write a program in which user enters the coordinates of two points on a number line, and then program prints coordinates of the point halfway between the endpoints.
Explanation of Solution
Given:
The required program needs to find the midpoint of two given points.
Calculation:
The following is the required BASICProgram-
10 INPUT “Enter the x -coordinate of first point”:
20 INPUT “Enter they -coordinate of first point”:
30 INPUT “Enter the x -coordinate of second point”:
40 INPUT “Enter the y -coordinate of second point”:
50LET
60 LET
70 PRINT “The x coordinate of midpoint is”:
80 PRINT “ They coordinate of midpoint is”:
90 END.
DRY RUN of the program:-
INPUT:
Enter the x -coordinate of first point
Enter the y -coordinate of first point
Enter the x -coordinate of second point
Enter the y -coordinate of second point
OUTPUT:
The x coordinate of midpoint is
The y coordinate of midpoint is
Chapter 1 Solutions
Algebra and Trigonometry: Structure and Method, Book 2
Additional Math Textbook Solutions
Pre-Algebra Student Edition
Introductory Statistics
Intro Stats, Books a la Carte Edition (5th Edition)
Elementary Statistics (13th Edition)
College Algebra (7th Edition)
- Algebra and Trigonometry (6th Edition)AlgebraISBN:9780134463216Author:Robert F. BlitzerPublisher:PEARSONContemporary Abstract AlgebraAlgebraISBN:9781305657960Author:Joseph GallianPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
- Algebra And Trigonometry (11th Edition)AlgebraISBN:9780135163078Author:Michael SullivanPublisher:PEARSONIntroduction to Linear Algebra, Fifth EditionAlgebraISBN:9780980232776Author:Gilbert StrangPublisher:Wellesley-Cambridge PressCollege Algebra (Collegiate Math)AlgebraISBN:9780077836344Author:Julie Miller, Donna GerkenPublisher:McGraw-Hill Education