Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I)write it in C# in Unity (1) Write a function called Money( ) that calculates the amount of money a person can earn over a

I)write it in C# in Unity (1) Write a function called Money( ) that calculates the amount of money a person can earn over a period of N days if her salary is one dollar the first day, two dollars the second day, and continues to double each day. Test N = 5 days and N = 20days.
II)
Also, a function called AverageN( ) which calculates the average of = 1 + 2 + 3 + + 100
III)
To determine whether a year is a leap year, the algorithm is:
1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4. The year is a leap year (it has 366 days).
5. The year is not a leap year (it has 365 days).
For example, the years 2000 and 2020 are leap years, while the years 1800 and 1900 are not leap years. Write a function called LeapYear( ) which count how many leap years between (and including) the year 1700 and 2100

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

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

2 The main characteristics of the market system.

Answered: 1 week ago