Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Restrictions: No looping statements allowed (or needed). This question requires the use of the functions: length(), substring(). Write a complete program that ask the user

Restrictions: No looping statements allowed (or needed). This question requires the use of the functions: length(), substring().

Write a complete program that ask the user prompt a number with 6 digits and output the encrypted password. Your program should behave as follow:

1. Display a welcome message.

2. Ask the user for the input number.

3. Use a constant variables to store the value 10 in the program.

4. Display the encrypted number, which is equivalent by

1) Swap the 1st and 6th digits

2) Replace the second digit with the remainder of the second digit divided by 2.

3) Add 1 to the third digit of your input.

4) Replace the fourth digit with the remainder of the third digit divided by 3.

5) Swap the 4th and 5th digits.

5. Display a farewell message, so that the user knows that the program has terminated normally.

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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

15-5 How will MIS help my career?

Answered: 1 week ago