Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Nested if else C# CPSC1012 In-class Exercise #4-Decision Structure: Logical Operators/Nested if Student Name: Student Mark: /5 INSTRUCTIONS Complete the requirements of this assignment on
Nested if else
C#
CPSC1012 In-class Exercise #4-Decision Structure: Logical Operators/Nested if Student Name: Student Mark: /5 INSTRUCTIONS Complete the requirements of this assignment on your own. When you have finished, write your name on the board to get your instructor to mark your assignment. You are encouraged to create a flowchart/pseudo code; without that your instructor may not provide any assistance. Step 1: Create a program named CPSC1012-Ex04-YourName Step 2: In the Main() method, write the code that will do the following Ask the user to enter a year (i.e. 2018) Determine if the year entered is a leap year. Use the logic below to determine if a year is a leap year: o If the year is evenly divisible by 4 (i.e. 1980 is a leap year, but 1981 is not) o If the year is evenly divisible by 100, then it must also be evenly divisible by 40o (i.e. 1900 is not a leap year, but 2000 is a leap year) Display whether the year entered is a leap yearStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started