Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,151 questions

40,705 answers

573 users

How to convert megabytes to terabytes in C#

Freaking Awesome WordPress Hosting
76 views
asked Sep 14, 2020 by avibootz
edited Sep 14, 2020 by avibootz

1 Answer

0 votes
using System;
 
class Program
{
    static double MegabytesToTerabytes(long megabytes) {
        return (megabytes / 1024f) / 1024f;
    }
 
    static void Main()
    {
        int mb = 8459735;
         
        Console.WriteLine("{0:0.00}TB", MegabytesToTerabytes(mb));
    }
}
 
 
  
  
/*
run:
 
8.07TB
 
*/

 





answered Sep 14, 2020 by avibootz

Related questions

...