Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void TrollNum1()
- {
- /*
- * כתבו פעולה שתקלוט מספרים כלשהם .
- * קליטת הנתונים תיפסק כאשר ייקלט מספר שלא גדול מהמספר הקודם לו .
- * הפעולה תציג את מספר המספרים הגדולים מהמספר הקודמים להם שנקלטו
- * */
- int num = 0, myNum, count=0;
- Console.WriteLine("Choose number, each number!");
- myNum = int.Parse(Console.ReadLine()); //קלט
- while (myNum >= num)
- {
- count++;
- num = myNum;
- Console.WriteLine("Choose more number");
- myNum = int.Parse(Console.ReadLine());
- }
- Console.WriteLine("Hey, there are "+ count +" numbers.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement