Q1:Take values of length and breadth of a rectangle from user and check if it is square or not.
Q1:Take values of length and breadth of a rectangle from user and check if it is square or not.
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
![d4a".ill KOREK
bäs öeljäll - 2_5294137054538500768.pdf
سجل دخولك لتحرير الملف وحفظ التغي يرات ال. . .
Q1:Take values of length and breadth of a rectangle from user and check if it is square
or not.
Q2: Take two int values from user and print greatest among them.
Q3: A shop will give discount of 10% if the cost of purchased quantity is more than 1000.
Ask user for quantity
Suppose, one unit will cost 100.
Judge and print total cost for user.
Q3: A school has following rules for grading system:
a. Below 25 -F
b. 25 to 45 - E
c. 45 to 50 - D
d. 50 to 60 - C
e. 60 to 80 - B
1. Above 80 - A
Ask user to enter marks and print the corresponding grade.
Q4: Take input of age of 3 people by user and determine oldest and youngest among them.
Q5: Write a program to print absolute vlaue of a number entered by user. Without using
abs function.
INPUT: 1
OUTPUT: 1
INPUT: -1
OUTPUT: 1.
Q6: If
X= 2
y = 5
Z= 0
then find values of the following expressions:
a. x == 2
b. x != 5
c. x != 5 && y >= 5
d. z != 0 || x == 2
e. (y < 10)
Q7: Write a program to check whether a entered character is lowercase (a to z) or
uppercase ( A to Z).
•..](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7ea1142c-a79f-43e7-9a1e-261c7c09a02c%2F2d251f60-42f0-4f21-b744-491ef8f17e03%2F05kbhy9_processed.jpeg&w=3840&q=75)
Transcribed Image Text:d4a".ill KOREK
bäs öeljäll - 2_5294137054538500768.pdf
سجل دخولك لتحرير الملف وحفظ التغي يرات ال. . .
Q1:Take values of length and breadth of a rectangle from user and check if it is square
or not.
Q2: Take two int values from user and print greatest among them.
Q3: A shop will give discount of 10% if the cost of purchased quantity is more than 1000.
Ask user for quantity
Suppose, one unit will cost 100.
Judge and print total cost for user.
Q3: A school has following rules for grading system:
a. Below 25 -F
b. 25 to 45 - E
c. 45 to 50 - D
d. 50 to 60 - C
e. 60 to 80 - B
1. Above 80 - A
Ask user to enter marks and print the corresponding grade.
Q4: Take input of age of 3 people by user and determine oldest and youngest among them.
Q5: Write a program to print absolute vlaue of a number entered by user. Without using
abs function.
INPUT: 1
OUTPUT: 1
INPUT: -1
OUTPUT: 1.
Q6: If
X= 2
y = 5
Z= 0
then find values of the following expressions:
a. x == 2
b. x != 5
c. x != 5 && y >= 5
d. z != 0 || x == 2
e. (y < 10)
Q7: Write a program to check whether a entered character is lowercase (a to z) or
uppercase ( A to Z).
•..
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education