Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int boy, girl,i,c,p,a,b,d;
- c=1;
- Console.WriteLine("ata/at lo yeholim la'avod alay! mispar habanim hayav lihyot gadol mi'mispar habanot");
- Console.WriteLine();
- Console.WriteLine("please insert the number of boys: ");
- boy = int.Parse(Console.ReadLine());
- Console.WriteLine("please insert the number of girls: ");
- girl = int.Parse(Console.ReadLine());
- for (i = 1; i <= c; i++)
- {
- if (girl > boy)
- {
- c++;
- Console.WriteLine("tin tin tin !!wrong!! the number of boy must be bigger then girls!! try again");
- Console.WriteLine("boys: ");
- boy = int.Parse(Console.ReadLine());
- Console.WriteLine("girls: ");
- girl = int.Parse(Console.ReadLine());
- }
- else
- {
- p = boy - girl;
- Console.WriteLine("the hefresh between boy to girls is: " + p);
- a = boy + girl;
- Console.WriteLine("the number of students in the class is: " + a);
- b = a - p;
- d = b / 2;
- Console.WriteLine("the number of zugot is: " +d);
- }
- }
Add Comment
Please, Sign In to add comment