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 133 views
133 views asked Jul 23, 2022 by avibootz
1 answer 185 views
2 answers 164 views
1 answer 114 views
1 answer 277 views
1 answer 143 views
143 views asked Aug 25, 2021 by avibootz
1 answer 145 views
145 views asked Aug 25, 2021 by avibootz
...