Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. sbyte[,] pole = new sbyte[1, 500];
  14. for ()
  15. {
  16.  
  17. }
  18. Console.Write(pole[0, 0] + ",");
  19. for (int i = 1; i < 500; i++)
  20. {
  21. Console.Write(pole[0, i]);
  22. }
  23. Console.ReadKey();
  24. }
  25. static int factorial(int n)
  26. {
  27. int v = 1;
  28. for (int i = 1; i <= n; i++)
  29. {
  30. v = v * i;
  31. }
  32. return v;
  33. }
  34. static void pocitani(int delitel, sbyte[] pole)
  35. {
  36. int delenec = 1;
  37. for (int i = 0; i < 500; i++)
  38. {
  39. pole[i] = (sbyte)(delenec / delitel);
  40. delenec = (delenec % delitel) * 10;
  41. }
  42. }
  43. static void scitani(sbyte[] pole, sbyte[] poley)
  44. {
  45. sbyte palec = 0;
  46. for (int j = 500; j > 0; j--)
  47. {
  48. poley[j] = (sbyte)(poley[j] + pole[j] + palec);
  49. if (poley[j] > 9)
  50. {
  51. palec = (sbyte)(poley[j] / 10);
  52. poley[j] = (sbyte)(poley[j] % 10);
  53. }
  54.  
  55. }
  56.  
  57. }
  58.  
  59. }
  60.  
  61.  
  62.  
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement