Advertisement
KodingKid

Basic Cryptocurrency System in C#

Apr 27th, 2021
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.84 KB | None | 0 0
  1. class wallet //creates a class wallet
  2. {
  3.     int currency1 = 0; //makes it have no money
  4. }
  5. using System;
  6. public class Program
  7. {
  8. public static void Main()
  9. {
  10. CurrencyBlock = new Random(); //starts randomly generating numbers
  11. for (int i = 0; i < 100000; i++) //generates 100,000 numbers
  12. public static int GenerateRandomInt(CurrencyBlock) //actually makes the numbers
  13. {
  14. return rnd.Next();
  15. }
  16. }
  17. class input //makes a class for the input
  18. {
  19.     Console.ReadLine(); //reads input
  20. }
  21. if input = CurrencyBlock //if the input is one of the numbers
  22.     int currency1 + 1 //it adds a coin to the wallet
  23. int currency1 / 100 = final_number //divides currency by 100
  24. Console.WriteLine(final_number); //gives you your amount of money you have
  25. //the cryptocurrency is worth 1p per coin
  26. //to see this script in python, see here: https://pastebin.com/tMsLmAAv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement