Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics Numbers Numeric Types and Casting

Andrew Sims
Andrew Sims
627 Points

No matter how In write this program this is the error I get: System.IO.IOException: Read-only file system at System.I

Program.cs
using System;

class Program
{

    static double Divide(int dividend, int divisor)
    {
        return ((double)dividend / (double)divisor); }

    static void Main(string[] args)
    {
        // This should print "2.5".
        Console.WriteLine(Divide(5, 2));
        // This should print "3.3333333333..."
        // (Or a value close to that, since it can't be
        // infinitely precise.)
        Console.WriteLine(Divide(10, 3));
    }

}

1 Answer

Steven Parker
Steven Parker
231,198 Points

This code looks OK to me, plus the message about the "file system" makes me think there could be some problem with the server that performs the checking.

You might want to contact the Support folks directly on this one