strng ownerliane; string breed; num ownerId; num age; num weight; num weeklyFee; cout « "Please enter owner's ID:"; cin >> ownerId; cout « "Please enter owner's name:" cin >> ownerNane; cout « "Please enter dog's breed"; cin >> breed cout « "Please enter dog's age:" cin >> age; cout « "Please enter dog's weight"; cin >> weight; if (weight < 15) weeklyFee - 5s.00; else if(weight >» 15) and (weight <= 30) weeklyfee- 75.00; else if(weight > 30) and (weight <= 80) weeklyFee - 1es.ee; else() weeklyfee- 125.00; cout <« "Owner Name:" cin >> ownerNane; cout « "Owner ID:"; cin >> ownerId; cout c "Dog Breed:"; cin >> breed; cout « "Dog Age:"; cin >> age; cout « "Dog Height:"; cin >> weight; cout ce "Weekly Fee:"; cin >> weeklyFee; return e;
strng ownerliane; string breed; num ownerId; num age; num weight; num weeklyFee; cout « "Please enter owner's ID:"; cin >> ownerId; cout « "Please enter owner's name:" cin >> ownerNane; cout « "Please enter dog's breed"; cin >> breed cout « "Please enter dog's age:" cin >> age; cout « "Please enter dog's weight"; cin >> weight; if (weight < 15) weeklyFee - 5s.00; else if(weight >» 15) and (weight <= 30) weeklyfee- 75.00; else if(weight > 30) and (weight <= 80) weeklyFee - 1es.ee; else() weeklyfee- 125.00; cout <« "Owner Name:" cin >> ownerNane; cout « "Owner ID:"; cin >> ownerId; cout c "Dog Breed:"; cin >> breed; cout « "Dog Age:"; cin >> age; cout « "Dog Height:"; cin >> weight; cout ce "Weekly Fee:"; cin >> weeklyFee; return e;
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
Related questions
Question
100%
I am trying to conver pseudocode into code but keep running into errors. Currently I am stuck with an error based on placement of semicolons. Any help would be appreciated.
Expert Solution
Step 1
Correct the given program as follows:
- Use int data type for the variables that will store numeric data.
- Use && operator instead of and operator in the if-else conditions.
- End each statement with a semicolon.
- Do not use empty brackets like () for else statement as no condition is specified for the else statement.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education