Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

One form of Astrology posits that we can predict our future based on our name. This is called the Name Numberology. This homework does not

One form of Astrology posits that we can predict our future based on our name. This is called the Name Numberology. This homework does not make any arguments about if these numbers have meaning. You can read the link above to find out what the numbers are supposed to mean.

This homework is just about the algorithmic process of computing the numbers.

Given a person's name, we can compute three numbers.

Heart's Desire: the sum of all vowels in the name.

Personality Number: the sum of all consonants in your name.

Power Number: the sum of all letters in your name.

Each of these numbers must be a value between 1 and 9.

Most vowels are obvious: a, e, i, o, u. There is one ambiguous vowel y. We will call y a consonant if has (a,e,i,o,u) next to it. In "Sandy", y would be a vowel. In "Yaffa", y would be consonant because it is next to a.

Any non-letter value is completely ingored. You can count them as 0.

There is no difference between upper and lower case letters.

Let's say we want to compute the values for "Elijah".

First, we need to know what number each letter represents. They are given in the table below. Hint: there is a pattern here.

Letters Value
A, J, S 1
B, K, T 2
C, L, U 3
D, M, V 4
E, N, W 5
F, O, X 6
G, P, Y 7
H, Q, Z 8
I, R 9

We will compute the Heart's Desire first. We take "Elijah" and only look at the vowels "eia". We sum up the number each letter matches.

5 + 9 + 1 = 15

We noted early the result must be a number between 1 and 9. If we get a number that is larger than 9, we add the digits together. You might need to do this repeatedly.

1 + 5 = 6

The Heart's Desire number for "Elijah" is 6.

Next, we compute the Personality Number. This uses only the consonants. We add up "ljh". Again we need to convert to a number between 1 and 9.

3 + 1 + 8 = 12

1 + 2 = 3

Finally, we compute the Power Number will all the letters.

5 + 3 + 9 + 1 + 1 + 8 = 27

2 + 7 = 9

Here is what we have learned about "Elijah".

Heart's Desire: 6

Personality Number: 3

Power Number: 9

You will write a C program that asks the user to enter their name. Then you will compute these three numbers.

Since this needs to be a program there are two additional rules.

You may assume no one will ever type a name with more than 50 characters. If they do, just truncate to 50 characters.

If there are no letters (for example 12 is given as the name) print 0 for all values.

Here are some examples:

Example 1

Enter Your Name: Elijah Heart's Desire Number: 6 Personality Number: 3 Power Number: 9 

Example 2

Enter Your Name: abcdefghijklmnopqrstuvwxyz Heart's Desire Number: 4 Personality Number: 5 Power Number: 9 

Example 3

Enter Your Name: Madysinn Heart's Desire Number: 8 Personality Number: 1 Power Number: 9 

Example 4

Enter Your Name: Yaffa Heart's Desire Number: 2 Personality Number: 1 Power Number: 3 

Example 5

Enter Your Name: SpecialCaseXyyX Heart's Desire Number: 8 Personality Number: 3 Power Number: 2 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago