How to convert decimal to octal in C#

1 Answer

0 votes
using System;

class Program
{
    static void Main() {
        int _decimal = 89;

        string oct = Convert.ToString(_decimal, 8);
        
        Console.WriteLine(oct); 
    }
}




/*
run:

131

*/

 



answered Jul 23, 2022 by avibootz

Related questions

1 answer 222 views
222 views asked Jul 23, 2022 by avibootz
1 answer 291 views
2 answers 284 views
1 answer 197 views
1 answer 387 views
1 answer 217 views
217 views asked Aug 25, 2021 by avibootz
1 answer 225 views
225 views asked Aug 25, 2021 by avibootz
...