Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- // במשתנה X.Y שמורים שני ערכים
- // הצג הגדול ראשון
- //int x = 5;
- //int y = 10;
- //int temp;
- //if(x<y)
- //{
- // temp = x;
- // x = y;
- // y = temp;
- //}
- //Console.WriteLine(x + "," + y);
- /*********************************************************************/
- //קלט של 4 מספרים ותדפיס הגדול מהם וכמה פעמים נקלד
- //int num1 = 10;
- //int num2 = 12;
- //int num3 = 5;
- //int num4 = 10;
- //int count = 1;
- //int max;
- //if(num1 >= num2 && num1 >= num3 && num1 >= num4)
- //{
- // max = num1;
- // if(num1 == num2)
- // {
- // count = count + 1;
- // }
- // if(num1 == num3)
- // {
- // count = count + 1;
- // }
- // if (num1 == num4)
- // {
- // count = count + 1;
- // }
- //}
- // else if (num2 >= num1 && num2 >=num3 && num2 >= num4)
- // {
- // max = num2;
- // if(num2 == num1)
- // {
- // count = count + 1;
- // }
- // if (num2 == num3)
- // {
- // count = count + 1;
- // }
- // if(num2 == num4)
- // {
- // count = count + 1;
- // }
- // }
- /******************************************************************/
- //int alonVotes = 0;
- //int beneVotes = 0;
- //char vote = 'x';
- //while(vote != '#')
- //{
- // Console.WriteLine("Enter A or B");
- // vote = char.Parse(Console.ReadLine());
- // if (vote == 'A')
- // {
- // alonVotes = alonVotes + 1;
- // }
- // else if (vote == 'B')
- // {
- // beneVotes = beneVotes + 1;
- // }
- // Console.Write(vote);
- //}
- //if(alonVotes > beneVotes)
- //{
- // Console.WriteLine("The winner is: Alon ");
- //}else
- //{
- // Console.WriteLine("The winner is Bene ");
- //}
- /**************************************************************88/
- double payment;
- double average;
- double cumption = 7;
- if(cumption <= 5)
- {
- payment = 10;
- average = payment / cumption;
- Console.WriteLine("Payment is {0} average is {1}", payment,average);
- }
- else
- {
- payment = (cumption - 5) * 7 + 10;
- average = payment / cumption;
- Console.WriteLine("payment is " +payment+ " " + "Average is: " +(double)average);
- }
- /********************************************************************/
- /**** exersice 3 page 141
- //int number = 2;
- //int Lnum;
- //int rNum;
- //if(number % 7 == 0)
- //{
- // Console.WriteLine("Boom");
- //}
- //else if (number > 10)
- //{
- // Lnum = number / 10;
- // rNum = number % 10;
- // if(Lnum == 7 || rNum == 7)
- // {
- // Console.WriteLine("Number is big than 10 and -- Boom");
- // }
- //}
- /************************************************************/
- //char letter1 = 'a';
- //char letter2 = 'b';
- //if(letter2 == (letter1 +1))
- //{
- // Console.WriteLine("letter are consecutive");
- //}
- /*********************************************************/
- char character;
- Console.WriteLine("enter a character");
- character = char.Parse(Console.ReadLine());
- if(character >= '0' && character<='9')
- {
- Console.WriteLine((char) (character+1));
- }
- else
- {
- Console.WriteLine("not number");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement