Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create program that converts minutes into years and days.a . Declare constants, using type - inference in each case, for the number ofi. Minutes in

Create program that converts minutes into years and days.a. Declare constants, using type-inference in each case, for the number ofi. Minutes in an hourii. Hours in a dayiii. Days in a yeariv. Minutes in a year, calculated using the above three constantsb. Declare variables with appropriate data types for the number of minutes, years and days assume that we will have only a whole number of minutes and years, but fractional days arepossible, and that the original number of minutes will always make at least one yearc. Calculatei. the years using integer divisionii. the remaining minutes using the % operatoriii. how many days the remaining minutes would representd. Output the original number of minutes, and then each of the calculated quantities along withappropriate messages explaining each output.e. Test the program a few times with a randomly generated original number of minutes between 1million and 5 million, and verifying that the calculated years, remaining minutes, and days arecorrect. For Swift programming language.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions