Write a PL/SQL Program to do the following Your Program should request the user to enter the temperature. Then based on the users input your program should display the following messages a. Print "Hot" if the temperature is above 80 degrees, b. Print " Nice Weather" if it's between 50 and 80 degrees, c. Print "cold" if it is less than 50 degree

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please use live oracle :

because when ever i run it it says:

Unsupported Command ORA-06550: line 6, column 11: PLS-00103: Encountered the symbol "&" when expecting one of the following: ( - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> continue avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specif 

 

 

 

this is the code:

-- Taking user input for temperature ACCEPT temp NUMBER PROMPT 'Enter temperature: ' -- Declaring temp variable to be used for comparision DECLARE temp number; -- Initializing value BEGIN temp := &temp; -- If temperature is greater than 85 IF ( temp >85 ) THEN dbms_output.put_line('Hot!' ); -- If temperature is less than 85 and greater than 55 ELSIF ( temp>55 AND temp<85) THEN dbms_output.put_line('Nice weather!' ); -- If temperature is lower than 40 ELSIF ( temp < 40 ) THEN dbms_output.put_line('Cold weather!' ); -- If block ends here END IF; end; /

Write a PL/SQL Program to do the following
Your Program should request the user to enter the temperature. Then based on the
users input your program should display the following messages
a. Print "Hot" if the temperature is above 80 degrees,
b. Print" Nice Weather" if it's between 50 and 80 degrees,
Print "cold" if it is less than 50 degree
C.
Test 40, 55 and 85 as inputs;
Guideline:
Create a unique code
Add Comments to the program
Take clear screen shots of the program source code and the outputs
Explain the code block briefly
Run the program for test cases (where applicable)
Paste all the screen shots to a Word Document and convert the Word Document to
PDF Upload the PDF to Moodle before deadline
Transcribed Image Text:Write a PL/SQL Program to do the following Your Program should request the user to enter the temperature. Then based on the users input your program should display the following messages a. Print "Hot" if the temperature is above 80 degrees, b. Print" Nice Weather" if it's between 50 and 80 degrees, Print "cold" if it is less than 50 degree C. Test 40, 55 and 85 as inputs; Guideline: Create a unique code Add Comments to the program Take clear screen shots of the program source code and the outputs Explain the code block briefly Run the program for test cases (where applicable) Paste all the screen shots to a Word Document and convert the Word Document to PDF Upload the PDF to Moodle before deadline
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY