Construct flowcharts and algorithms for the following problems: 1. Convert a decimal number into its equivalent binary, octal, or hexadecimal form according to the given option. 2. Test whether a given string is a palindrome. 3. Count the number of vowels, consonants, and special characters in a given string. 4. Unscramble a four-letter word. [Hint. Let abcd be the given four-character string. The process should find out all the words by jumbling the characters, such as acbd and adbe.] 5. Convert a given Roman numeral into its decimal equivalent. The fol- lowing table gives the Roman numerals and their decimal equivalents: Roman Decimal M 1000 D 500 C 100 50 X 10 V 5 The algorithm for converting a Roman numeral RI, R2, .Rn to a decimal is given below: 1. I+1 (I denotes the position of the symbol being scanned) 2. DECIMAL 0 DECIMAL is to hold the decimal value ofthe given Roman numeral) 3. REPEAT steps 4 through 6 WHILE I < N. 4. If the decimal value of R, is greater than or equal to the decimal value of R,., add the decimal value of R, to DECIMAL else subtract the decimal value of R, from DECIMAL. 5. COMPUTE I +I+1. 6. END-WHILE.
Construct flowcharts and algorithms for the following problems: 1. Convert a decimal number into its equivalent binary, octal, or hexadecimal form according to the given option. 2. Test whether a given string is a palindrome. 3. Count the number of vowels, consonants, and special characters in a given string. 4. Unscramble a four-letter word. [Hint. Let abcd be the given four-character string. The process should find out all the words by jumbling the characters, such as acbd and adbe.] 5. Convert a given Roman numeral into its decimal equivalent. The fol- lowing table gives the Roman numerals and their decimal equivalents: Roman Decimal M 1000 D 500 C 100 50 X 10 V 5 The algorithm for converting a Roman numeral RI, R2, .Rn to a decimal is given below: 1. I+1 (I denotes the position of the symbol being scanned) 2. DECIMAL 0 DECIMAL is to hold the decimal value ofthe given Roman numeral) 3. REPEAT steps 4 through 6 WHILE I < N. 4. If the decimal value of R, is greater than or equal to the decimal value of R,., add the decimal value of R, to DECIMAL else subtract the decimal value of R, from DECIMAL. 5. COMPUTE I +I+1. 6. END-WHILE.
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%
![2:01 M
all all 71% i
EXERCISES
Construct flowcharts and algorithms for the following problems:
1. Convert a decimal number into its equivalent binary, octal, or
hexadecimal form according to the given option.
2. Test whether a given string is a palindrome.
3. Count the number of vowels, consonants, and special characters in a
given string.
4. Unscramble a four-letter word.
[Hint. Let abcd be the given four-character string. The process should
find out all the words by jumbling the characters, such as acbd and
adbe.]
5. Convert a given Roman numeral into its decimal equivalent. The fol-
lowing table gives the Roman numerals and their decimal equivalents:
Roman
Decimal
M
1000
500
C
100
L
50
10
V
5
I
1
The algorithm for converting a Roman numeral
R1, R2, ..Rn
to a decimal is given below:
1. I+1
(I denotes the position of the symbol being scanned)
2. DECIMAL+0
DECIMAL is to hold the decimal value of the given Roman numeral
3. REPEAT steps 4 through 6 WHILE I < N.
4. If the decimal value of R, is greater than or equal to the decimal
value of R,, add the decimal value of R, to DECIMAL else subtract
the decimal value of R, from DECIMAL.
5. COMPUTE IeI+1.
6. END-WHILE.
II](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F53d54b4f-daab-4cfc-96e7-e26cf058c42f%2F5133a623-1b1a-4605-853a-e1ffedd51b24%2Faqm8ofj_processed.jpeg&w=3840&q=75)
Transcribed Image Text:2:01 M
all all 71% i
EXERCISES
Construct flowcharts and algorithms for the following problems:
1. Convert a decimal number into its equivalent binary, octal, or
hexadecimal form according to the given option.
2. Test whether a given string is a palindrome.
3. Count the number of vowels, consonants, and special characters in a
given string.
4. Unscramble a four-letter word.
[Hint. Let abcd be the given four-character string. The process should
find out all the words by jumbling the characters, such as acbd and
adbe.]
5. Convert a given Roman numeral into its decimal equivalent. The fol-
lowing table gives the Roman numerals and their decimal equivalents:
Roman
Decimal
M
1000
500
C
100
L
50
10
V
5
I
1
The algorithm for converting a Roman numeral
R1, R2, ..Rn
to a decimal is given below:
1. I+1
(I denotes the position of the symbol being scanned)
2. DECIMAL+0
DECIMAL is to hold the decimal value of the given Roman numeral
3. REPEAT steps 4 through 6 WHILE I < N.
4. If the decimal value of R, is greater than or equal to the decimal
value of R,, add the decimal value of R, to DECIMAL else subtract
the decimal value of R, from DECIMAL.
5. COMPUTE IeI+1.
6. END-WHILE.
II
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 6 steps with 5 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