Use the findpos and findaltchar function in encrypt function

Assignment Help Computer Engineering
Reference no: EM132198991

Write a function called encrypt (A, P, Off) where A is an alphabet string, P is a string to be encrypted and Off is the offset.

A new string new P is returned where each character of new P is represented by the character that is Off positions after the character in P (wrapped around to the start if the offset takes it beyond the end of the string).

Use the findpos and findaltchar functions in the encrypt function. Call the encrypt function from the main program and also print the encrypted phrase.

For example, given the alphabet above, an offset of 5 and the phrase hello world, the program should output.

Reference no: EM132198991

Questions Cloud

Perfect competition or monopolistic competition : In which market would you expect firms to advertise the most, perfect competition or monopolistic competition. Clearly explain your answer.
Describe what additional actions the fed would need to take : Use supply-and-demand graphs of the federal funds market to analyze the following situation: Suppose that the equilibrium federal funds rate is equal.
Maintain a fixed exchange rate : Discuss the conditions under which fixed exchange may prove superior to flexible exchange rate.
Explain why acme hospital produces at a higher cost : Suppose that you are interested in comparing the costs of producing inpatient services at Saving Grace Hospital with those at ACME Hospital.
Use the findpos and findaltchar function in encrypt function : Write a function called encrypt (A, P, Off) where A is an alphabet string, P is a string to be encrypted and Off is the offset.
What are the monopoly profits on the vaccine : What price would a profit maximising monopolist charge for a vaccine? What are the monopoly profits on the vaccine? What is the efficient outcome.
Brief synopsis of the differences between private : Provide a brief synopsis of the differences between private, common, and public goods, and the value of this difference to the economy.
What types of concerns require the largest emphasis : Describe your company’s efforts in the area of federal compliance. What types of concerns require the largest emphasis?
Decision making within an organization : Briefly discuss a government policy that affects the decision making within an organization

Reviews

Write a Review

Computer Engineering Questions & Answers

  Defining information security governance and management task

Information security management and governance are not simply implemented tasks within organizations. An information security governance program is a program.

  Analysis of the expenditure cycle

You will apply the REA Model and use Microsoft Access software to complete the case analysis of the expenditure cycle. Draw E-R diagrams that illustrate the relationships between these items

  Develop and deploy a smart application

You are allowed to use available services of IBM Bluemix like IoT foundation services to develop smart applications. There are many demo codes like Connected Vehicle application demo available to help you implement smart vehicle in IBM Bluemix.

  Process used to detect and correct transmission errors

process used to detect and correct transmission errors.

  What are trade-os for approach versus linearizing f directly

How this decomposition can be used in the context of linearizing the function f. What are the trade-os for this approach versus linearizing f directly?

  Write a paper on given article commenting on its importance

Write a 3-4-page paper on this article commenting on its importance, or if you don't think it is important, explain why you believe that.

  How many bits should immediate field of i-type instruction

By how many bits should the immediate field of an I-type instruction be reduced to match the length on an R-type instruction for the follow modifications to the MIPS architecture?

  Make another java program that decrypts the file

however there are complex encryption techniques, you should come up with a simple one of your own. For example, you could read the first file one character at a time, and add 10 to the character code of each character before it is written to the s..

  Do you believe in the existence of wonder heaps

Give a one-sentence definition of i) worst-case running time, ii) tractable problems, iii) the Subset Sum Problem.

  Compute the internet checksum for the received ud

Suppose that the UDP receiver computes the Internet checksum for the received UDP segment and finds that it matches the value carried in the checksum field.

  Show that the unit must change with distance

We have proven that radiance does not go down along a straight line in a non-absorbing medium, which makes it a useful unit.

  Metric conversion program

Write down a javascript which will assist user along with the metric conversions. Your program must enable the user to state the names of units as strings.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd