Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise1:(34 points) 1. Generate 30 random numbers from the following range: (10 points ) 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30,

image text in transcribed

Exercise1:(34 points) 1. Generate 30 random numbers from the following range: (10 points ) 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40 For each of the numbers do the following: 2. Print the "displayvalue" For most numbers the "display value" is the number itself. However, all multiples of 10 should be represented as roman numerals: 10 .. X 20 .. XX 30 .. XXX 40 .. XL All display values" (numbers and roman numerals) should be printed in tabular form Each row should have 5 equally spaced columns that are left-aligned (see sample output) There should be no leading spaces at the beginning of a row and exactly one space between the roman numel XXX (30) and the next "display values" . 3. At the end print all done It should be printed in a separate line directly below the previous output. Below you can see the results I got from running my program Notice: because the numbers are random, your output is likely to look different from mine Sample Output XX22 34 16 X XXX 14 38 XL 34 38 X XX34 28 12 34 18 X 24 XXL 32 12 12 24 24 XXX 34 all done

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_step_2

Step: 3

blur-text-image_step3

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

More Books

Students also viewed these Databases questions