Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Working with the instructor, complete the following programming exercises. Write a program that requests an integer from the user and prints whether the integer is

Working with the instructor, complete the following programming exercises.
Write a program that requests an integer from the user and prints whether the integer is positive or negative or zero.
A year with 366 days is called a leap year. Leap years are necessary to keep the calendar in synch with the sun, because the earth revolves around the sun once very 365.25 days. As a result, years that are divisible by 4, like 1996, are leap years. However, years that are divisible by 100, like 1900, are not leap years. But years that are divisible by 400, like 2000, are leap years. Write a program that asks the user for a year and computes whether that year is a leap year.
Write a program that prompts the user to enter a number in the range 1 through 10. The program should display the Roman numeral version of that number. If the number is outside the range of 1 to 10, the program should display an error message. The table below shows the Roman numerals for the numbers 1 through 10.
Number Roman Numeral
1 I
2 II
3 III
4 IV
5 V
6 VI
7 VII
8 VIII
9 IX
10 X

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: 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

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions