Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Show output Assignment 5: Random, Strings, and Math Please complete the program described below. You will turn in to the dropbox: - The code, as

image text in transcribedimage text in transcribedShow output

Assignment 5: Random, Strings, and Math Please complete the program described below. You will turn in to the dropbox: - The code, as a plaintext file (use cat filename.c to print out the file. Highlight it to copy, then paste into a text editor) - A screenshot of the code running with your name included The file must be named rand.c located in a folder called a5 in your home directory You will write a program that will do that following: - Make a string of size 100 . Fill the first 10 indexes with random characters. - Make a second string of size 100. Fill the first 10 indexes with random characters. - Make a third of size 100 . Fill the first 20 indexes with random characters. - Print out all 3 strings - Concatenate the second string onto the first - Print this string out - Retrieve the difference between the first and third string (store as a float) - Set it to the absolute value of itself - Take the square root of that difference - Print the difference As a note: to get a random character, you can use the following line of code: char randomLetter = ' a ' + random; Assuming random is an integer between 0 and 25 , inclusive Note: In your screenshot, you do not need to show multiple outputs. Your output will likely not look the same as mine. This is just to show multiple ways it could look. Random is random after all

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

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

What traditional external methods of recruitment are available?

Answered: 1 week ago

Question

=+How should it be delivered?

Answered: 1 week ago

Question

=+4 How does one acquire a global mindset?

Answered: 1 week ago