Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- struct BigNum
- {
- public int ones, K, M, B, T, Qa; // and higher
- public BigNum(int Qa, int T, int B, int M, int K, int ones)
- {
- this.ones = ones;
- this.K = K;
- this.M = M;
- this.B = B;
- this.T = T;
- this.Qa = Qa;
- }
- public override string ToString()
- {
- if (Qa > 0) return Qa.ToString() + "." + T.ToString() + "Qa";
- if (T > 0) return T.ToString() + "." + B.ToString() + "T";
- if (B > 0) return B.ToString() + "." + M.ToString() + "B";
- if (M > 0) return M.ToString() + "." + K.ToString() + "M";
- if (K > 0) return K.ToString() + "." + ones.ToString() + "K";
- return ones.ToString();
- }
- }
- static void Main(string[] args)
- {
- BigNum bignum = new BigNum(0, 0, 0, 50, 0, 0);
- Console.WriteLine();
- Console.WriteLine(" bignum = " + bignum.ToString());
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement