and max both in Celsius and in Fahrenheit. The formula for converting from Celsius to Fahrenheit is given by: Fahrenheit = Celsius * 9/5 + 32 [Note: take only the quotient of the division by 5, ignore the fraction.] Your program must define and use the following procedures: (a) Procedure ReadTemps: reads the value of N and the N temperatures in Celsius and stores the N temperatures in a defined array CTEMPS. If there is an error in the value of N (not between 1 and 20) then it displays an error message and asks the user to enter N again and again until the entered value is correct. While reading the N temperatures, the procedure also determines the positions MinIndex and MaxIndex in the array CTEMPS of the Min and Max temperatures.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

(use irvne32 library) labrWrite an assembly language program that allows the user to enter an integer N (between 1 and 20) and a list of
N integer temperatures in Celsius. The program then displays on the screen the N temperatures and their min
and max both in Celsius and in Fahrenheit. The formula for converting from Celsius to Fahrenheit is given by:
Fahrenheit = Celsius * 9/5 + 32 [Note: take only the quotient of the division by 5, ignore the fraction.]
Your program must define and use the following procedures:
(a) Procedure ReadTemps: reads the value of N and the N temperatures in Celsius and stores the N
temperatures in a defined array CTEMPS. If there is an error in the value of N (not between 1 and 20) then
it displays an error message and asks the user to enter N again and again until the entered value is correct.
While reading the N temperatures, the procedure also determines the positions MinIndex and MaxIndex in
the array CTEMPS of the Min and Max temperatures.
(b) Procedure ConvertTemps: converts the N temperatures from Celsius to Fahrenheit. The converted N
temperatures to Fahrenheit must be stored in a second defined array FTEMPS.
(c) Procedure DisplayTemps: displays the N temperatures and their Min and Max both in Celsius and in
Fahrenheit as shown in the following sample run.:

Write an assembly language program that allows the user to enter an integer N (between 1 and 20) and a list of
N integer temperatures in Celsius. The program then displays on the screen the N temperatures and their min
and max both in Celsius and in Fahrenheit. The formula for converting from Celsius to Fahrenheit is given by:
Fahrenheit = Celsius * 9/5 + 32 [Note: take only the quotient of the division by 5, ignore the fraction.]
Your program must define and use the following procedures:
(a) Procedure ReadTemps: reads the value of N and the N temperatures in Celsius and stores the N
temperatures in a defined array CTEMPS. If there is an error in the value of N (not between 1 and 20) then
it displays an error message and asks the user to enter N again and again until the entered value is correct.
While reading the N temperatures, the procedure also determines the positions MinIndex and MaxIndex in
the array CTĒMPSS of the Min and Max temperatures.
(b) Procedure ConvertTemps: converts the N temperatures from Celsius to Fahrenheit. The converted N
temperatures to Fahrenheit must be stored in a second defined array FTEMPS.
(c) Procedure DisplayTemps: displays the N temperatures and their Min and Max both in Celsius and in
Fahrenheit as shown in the following sample run.:
A CAWINDOWS\system32\cmd.exe
Enter the number of temperatures N (between 1 and 20): -1
Error. The value of N must be between 1 and 20. Try again!
Enter the number of temperatures N (between 1 and 20): 21
Error. The value of N must be between 1 and 20. Try again!
Enter the number of temperatures N (between 1 and 20): 4
Enter the temperatures in Celsius:
33
|-3
|-9
21
The temperatures and their Min and Max in Celsius and in Fahrenheit are:
Celsius
Fahrenheit
+33
+91
-3
+27
-9
+16
+21
+69
Min
Мах
-9
+16
+33
+91
Press any key to continue ..
Transcribed Image Text:Write an assembly language program that allows the user to enter an integer N (between 1 and 20) and a list of N integer temperatures in Celsius. The program then displays on the screen the N temperatures and their min and max both in Celsius and in Fahrenheit. The formula for converting from Celsius to Fahrenheit is given by: Fahrenheit = Celsius * 9/5 + 32 [Note: take only the quotient of the division by 5, ignore the fraction.] Your program must define and use the following procedures: (a) Procedure ReadTemps: reads the value of N and the N temperatures in Celsius and stores the N temperatures in a defined array CTEMPS. If there is an error in the value of N (not between 1 and 20) then it displays an error message and asks the user to enter N again and again until the entered value is correct. While reading the N temperatures, the procedure also determines the positions MinIndex and MaxIndex in the array CTĒMPSS of the Min and Max temperatures. (b) Procedure ConvertTemps: converts the N temperatures from Celsius to Fahrenheit. The converted N temperatures to Fahrenheit must be stored in a second defined array FTEMPS. (c) Procedure DisplayTemps: displays the N temperatures and their Min and Max both in Celsius and in Fahrenheit as shown in the following sample run.: A CAWINDOWS\system32\cmd.exe Enter the number of temperatures N (between 1 and 20): -1 Error. The value of N must be between 1 and 20. Try again! Enter the number of temperatures N (between 1 and 20): 21 Error. The value of N must be between 1 and 20. Try again! Enter the number of temperatures N (between 1 and 20): 4 Enter the temperatures in Celsius: 33 |-3 |-9 21 The temperatures and their Min and Max in Celsius and in Fahrenheit are: Celsius Fahrenheit +33 +91 -3 +27 -9 +16 +21 +69 Min Мах -9 +16 +33 +91 Press any key to continue ..
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education