private static void stringExercise1() { Console.WriteLine("Enter a Word or sentence"); string inputString = Console.ReadLine(); Console.WriteLine(ListExercise.RemovedelAtIndex1(inputString)); }
private static void stringExercise6() { System.Console.WriteLine("Enter your name"); string inputString = Console.ReadLine(); Console.WriteLine(ListExercise.Endup(inputString)); }
private static void stringExercise3() { Console.Write("String user input:"); string inputString = Console.ReadLine(); Console.WriteLine(ListExercise.NotString(inputString)); }
private static void stringExercise2() { Console.WriteLine("Enter a Word or sentence"); string inputString = Console.ReadLine(); Console.WriteLine(ListExercise.mixStart(inputString)); }
async private void OnExerciseStarted(object sender, EventArgs e) { if (listExercise.Count <= 0) { await DisplayAlert("Note", "you must to add exercises", "OK"); if (dayexercise.Type.Contains("adult")) { await Navigation.PushAsync(new ExercisesAdult { BindingContext = dayexercise }); } else if (dayexercise.Type.Contains("children")) { await Navigation.PushAsync(new ExercisesChildren { BindingContext = dayexercise }); } } else { ListExercise listExer = new ListExercise { Exercises = (List <Exercise>) this.listExercise, IndexExercise = 0, DayType = dayexercise.Type }; var exerciseStart = new ExerciseStart(); exerciseStart.BindingContext = listExer as ListExercise; await Navigation.PushModalAsync(exerciseStart, true); } }
private static void intExercise2() { Console.Write("Enter number1 :"); int num1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter number2 :"); int num2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(ListExercise.max1020(num1, num2)); }
protected override void OnAppearing() { base.OnAppearing(); listExercise = (ListExercise)BindingContext; Exercise exercise = listExercise.Exercises[listExercise.IndexExercise]; image.Source = exercise.ImageExercise; nameExercise.Text = exercise.NameExercise; repNumber.Text = exercise.Time; Sound(); Plugin.TextToSpeech.CrossTextToSpeech.Current.Speak($"you need exercise {repNumber.Text} {nameExercise.Text} "); }
private static void intExercise5() { Console.WriteLine("Enter ages for Students"); Console.Write("Student1:"); int age1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Student2 :"); int age2 = Convert.ToInt32(Console.ReadLine()); Console.Write("Student3 :"); int age3 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(ListExercise.HasTeen(age1, age2, age3)); }
private static void intExercise1() { try { Console.WriteLine("Enter 1st number"); int num1 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Enter 2nd number"); int num2 = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(ListExercise.In3050(num1, num2) ? "yes in range" : "no not"); } catch (FormatException ex) { Console.WriteLine("Input must be a number : " + ex.Message); } }
private static void boolExercise3() { try { Console.WriteLine("Is monkey A smiling? true or false"); bool asmiling = Convert.ToBoolean(Console.ReadLine()); Console.WriteLine("Is monkey B smiling? true or false"); bool bsmiling = Convert.ToBoolean(Console.ReadLine()); Console.Write("Are we in trouble ? :" + (ListExercise.InTrouble(asmiling, bsmiling) ? "Yes" : "No")); } catch (FormatException ex) { Console.WriteLine("Input must be true or false : " + ex.Message); } finally { Console.Read(); } }
private static void boolExercise2() { try { Console.WriteLine("Is it a week day? true or false"); bool weekday = Convert.ToBoolean(Console.ReadLine()); Console.WriteLine("Are you on Vacation? true or false"); bool vacation = Convert.ToBoolean(Console.ReadLine()); Console.Write("We sleep ? :" + (ListExercise.sleepin(weekday, vacation) ? "Yes" : "No")); } catch (FormatException ex) { Console.WriteLine("Input must be true or false :" + ex.Message); } finally { Console.Read(); } }
private static void boolExercise1() { Console.WriteLine("Enter name"); string userInput = Console.ReadLine(); if (Validator.isvalidInputString(userInput)) { var result = ListExercise.doesContainVowels(userInput); string outputMessage = result == true ? "Your Name have vowel" : "That's unique Name"; Console.WriteLine(outputMessage); } else { Console.WriteLine("Input not correct"); } //todo: ask again and run agan }
async protected override void OnAppearing() { base.OnAppearing(); i = 20; value = -1; progressTime.Progress = 0; listExercise = (ListExercise)BindingContext; if (listExercise.IndexExercise < (listExercise.Exercises.Count - 1)) { var index = listExercise.IndexExercise; NameExercise.Text = listExercise.Exercises[index + 1].NameExercise; TimeExercise.Text = listExercise.Exercises[index + 1].Time; Plugin.TextToSpeech.CrossTextToSpeech.Current.Speak($"the next : {TimeExercise.Text} {NameExercise.Text} "); } await progressTime.ProgressTo(1, 20000, Easing.Linear); }
public void testIn3050() { Assert.AreEqual(ListExercise.In3050(30, 40), true); Assert.AreEqual(ListExercise.In3050(30, 41), false); Assert.AreEqual(ListExercise.In3050(40, 50), true); }
public void testSum() { Assert.AreEqual(ListExercise.getFirstDuplicateChar("abbccde").Equals("Duplicate char is b"), true); }
private static void stringExercise10() { var result = ListExercise.getFirstDuplicateChar("abcbdde"); Console.WriteLine($"{result}"); }
private static void arrayExercise2() { int[] arrInt = new int[] { 1, 2, 9, 9, 3, 2, 9 }; Console.WriteLine("Count of 9: " + ListExercise.arayCount9(arrInt)); }
private static void arrayExercise1() { int[] arrInt = new int[] { 1, 1, 2, 4, 1 }; Console.WriteLine(ListExercise.Array123(arrInt)); }
public void TestInTrouble() { Assert.AreEqual(ListExercise.InTrouble(true, false), false); Assert.AreEqual(ListExercise.InTrouble(false, false), true); Assert.AreEqual(ListExercise.InTrouble(true, true), true); }