Advertisement
amjadArabia

c# 22/11/2019

Nov 22nd, 2019
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.11 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 ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. // BASENUM ומספר שני POWNUM כתוב תוכנית המגרילה שני מספרים בין 0 ל 5 מספר ראשון
  14.  
  15.  
  16. //Random rnd = new Random();
  17. //int baseNum = rnd.Next(0, 5);
  18. //int PowNum = rnd.Next(0, 5);
  19.  
  20. //Console.WriteLine("the first number is: " + firstNum);
  21. //Console.WriteLine("the second number is: " + secNumber);
  22.  
  23. //int sum = (int)Math.Pow(baseNum, PowNum);
  24.  
  25. //Console.WriteLine(baseNum);
  26.  
  27. //------------------------------------------------------------
  28.  
  29. //Random rnd = new Random();
  30. //int num1 = rnd.Next(1, 5);
  31. //int num2 = rnd.Next(1, 5);
  32.  
  33. //Console.WriteLine("num1 = " + num1);
  34. //Console.WriteLine("num2 = " + num2);
  35. //bool a = num1 == num2;
  36. //bool b = num1 % 2 == 0;
  37.  
  38.  
  39. //Console.WriteLine("a = " + a);
  40. //Console.WriteLine("b = " + b);
  41.  
  42. //String str = a.ToString() + b.ToString();
  43.  
  44. //Console.WriteLine(str);
  45.  
  46. //bool c = str == "TrueTrue";
  47.  
  48. //Console.WriteLine("C = " + c);
  49.  
  50.  
  51. //--------------------------------------------------------------
  52.  
  53. //Console.WriteLine("PLease enter the hour time");
  54. //int hour = int.Parse(Console.ReadLine());
  55. //Console.WriteLine("Please enter the minute time");
  56. //int minute = int.Parse(Console.ReadLine());
  57.  
  58. //if (hour >= 0 && hour <= 23 && minute >= 0 && minute <= 59)
  59. //{
  60. // Console.WriteLine("The time is:" + hour + ":" + minute);
  61. //}
  62. // if (hour >= 0 && hour <= 24 && minute >= 0 && minute == 60)
  63. //{
  64. // Console.WriteLine("The time is:" + (hour + 1) + ":" + "00");
  65. //}
  66. //else
  67. //{
  68. // Console.WriteLine("Erorr the time is not correct");
  69. //}
  70.  
  71. //--------------------------------------------------
  72. // tel-aviv team need player that age from 14-18 Or 21 - 26 And height more than 182cm
  73.  
  74. //Console.WriteLine("enter your age");
  75. //int playerAge = int.Parse(Console.ReadLine());
  76.  
  77. //Console.WriteLine("enter your height");
  78. //int playerHeight = int.Parse(Console.ReadLine());
  79.  
  80. //if ((playerAge >= 14 && playerAge < 19) || (playerAge >= 21 && playerAge < 27) && playerHeight > 182)
  81. //{
  82. // Console.WriteLine("You can play with tel-aviv team");
  83. //}
  84. //else
  85. //{
  86. // Console.WriteLine("Sory you cant play with the team");
  87. //}
  88. //--------------------------------------------------------------
  89.  
  90.  
  91. // כתוב תוכנית המגרילה מספר שבין 0 ל 600 התוכנית תחזיר את השורש הריבועי של המספר שהוגרל הקפד על הודעות מתאימות למשתמש ותיעוד קוד
  92.  
  93. Console.WriteLine("enter a number from 0 to 600");
  94. int userNum = int.Parse(Console.ReadLine());
  95.  
  96. double num = Math.Sqrt(userNum);
  97.  
  98. Console.WriteLine("the number is" + userNum + "the math is:" + num);
  99.  
  100.  
  101. // תרגיל מסמפר עם 3 תלת-ספרתי ואפשר לקרוא אותו מ ימין לשמאל
  102. //Console.WriteLine("enter number with 3 digit");
  103. //int userNum = int.Parse(Console.ReadLine());
  104.  
  105. //int R = userNum % 10;
  106. //int L = userNum / 100;
  107.  
  108. //if(R == L)
  109. //{
  110. // Console.WriteLine("the number is palindrome");
  111. //}
  112. //else
  113. //{
  114. // Console.WriteLine("The number is not palindrome");
  115. //}
  116.  
  117.  
  118.  
  119. }
  120. }
  121. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement