Programming Exercises

1:Create a text file with Notepad called C:\MyTestFiles\ShortStory.txt with the contents:
This text
Only contains
Three lines

Write a program that tells the user the full name of the file and when it was created.

Please keep this program handy for exercise 2.

2:Extend the program in exercise 1 so that the program also counts the number of lines in C:\MyTestFiles\ShortStory.txt and shows this number on the console.
3:Write a program that contains an array called rainfall, containing twelve elements of type byte. Each element represents a monthly rainfall reading and can have a value between 0 and 200. Include a simple user interface so that the user can view the element values of rainfall and assign values to any one of its ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.