Learn C# beginner programming - Simple code - Im stuck on the Date format. Im creating a int for 142021 and a string for the month name. Efficiently create your codes to display the correct formatted output below. 1. The program CANNOT have literal(s) within the method invocation operator for Write and WriteLine. 2. Except for the date (the last line), each output line is a string that will be assigned to a variable. 3. For the last output, you must use a numerical variable for the day and year. 4. Can only have ONE variable of each data type declared in the entire program. 5. No additional libraries are allowed. 6. Use standard variable naming convention. Should look like this:
Learn C# beginner
Efficiently create your codes to display the correct formatted output below.
1. The program CANNOT have literal(s) within the method invocation operator for Write and WriteLine.
2. Except for the date (the last line), each output line is a string that will be assigned to a variable.
3. For the last output, you must use a numerical variable for the day and year.
4. Can only have ONE variable of each data type declared in the entire program.
5. No additional libraries are allowed.
6. Use standard variable naming convention.
Should look like this:
DateTime class: The DateTime is a class that is used to print the date and time in different formats. The below is a format to display the month name, day number, and year value using the below formats.
Format | Description |
MMMM | Name of the current month |
dd | Name of the current day |
yyyy | Current year value |
Step by step
Solved in 2 steps with 1 images