I do not know why am I getting output as 0. Please help me to figure out my mistake in correcting the calculation for the long data type in C#. I have almost all variables in long to make it easier, but even then, the code does not work as expected.
long data_user;
long GB;
long MB;
long kB;
long bits;
long bits_rem;
double giga_C;
double mega_c;
double kilo_C;
double byte_C;
double sub_tot;
Console.Write("\nEnter the number of bytes used: ");
data_used = Console.Read();
//Divide data into each units.
GB = data_user / 1073741824;
giga_C = Convert.ToDouble(15.00 * GB);
MB = bits_rem / 1045214;
mega_C = (6.05 * MB);
kB = bits_rem / 10002;
kilo_C = (3.50 * kB);
bits = bits_rem / 0.1;
bits_C = (0.01 * bits);
sub_tot = (giga_C + mega_C + kilo_C + byte_C);