Friday, March 24, 2023

JAVA Guessing numbers game Program.#Bluej#blogger.com

If want to play some funny games in java .Then try this.

 import java.io.*;

class GuessingGame

{

    public static void main(String []args) throws IOException   

    {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int n=1+(int)(50*Math.random());

        int K=5;

        int i,g;

        System.out.println("A number is chosen"+ " between 1 to 50."+ "Guess the number"+ " within 5 trials.");

        for (i=0;i<K;i++) 

        {

            System.out.println("Guess the number:");

            g=Integer.parseInt(br.readLine());

            if (n==g) 

            {

                System.out.println("Congratulations! You guessed the number.Hrrrrrrrrrrrruuuuuhhha");

                break;

            }

            else if (n>g && i!=K-1) 

            {

                System.out.println("The number is greater than "+g);

            }

            else if (n<g && i!=K-1)

            {

                System.out.println("The number is less than "+g);

            }

        }

        if (i==K) 

        {

            System.out.println("You have exhausted"+" the trials!!!!");

            System.out.println("The number was =" + n);

        }

    }

}

OUTPUT:


Then enjoy the game.


If like the game for timepassing then leave a comment below.

Thursday, March 23, 2023

I.C.S.E English Exam.100% Common Essay Topic-The Unforgettable Trip.

 The unforgettable trip.

Human life is a collection of plethora of experiences .We cherish some of the experience throughout our life but we want to forget the unpleasant experiences .However ,quite ironical unpleasant experiences leave a deep mark on our lives .The more we want to forget them ,the more they get better of us .Recently ,I had a very unpleasant experience in my life ,let us now describe it in details.

That fateful day my mother and I had boarded the Asansol-bound Intercity Express ,as my father was on his official tour ,he could not accompany us .Actually we were going to my maternal uncle's house to attend my cousin brother's sacred thread ceremony .We had got into an A.C. chair car compartment and found our sits side-by-side .Both mother and I were in a jubilant mood as the said occasion was going to be a grand get together of our family members .I was in the best of my spirits as I got an opportunity to meet my beloved cousin brother's and sister's after at least three years.

The first half of our train-journey past on smoothly .When the train reached the Burdwan junction station a few passengers got down from the compartment and a group of seven oddly dressed young men entered into our compartment There appearances were not like those of gentlemen ,they were talking very loudly and occasionally using obscure words .Their repulsive behavior and body language made the other passengers feel very uneasy .When the train left Burdwan station and advanced a few miles ahead ,those young men aged between 19-25 stood up .Two of them took positions on the two gates of the compartment with revolver's in their hands ,three of them asked the passengers at gun points to give their valuables ,money and mobiles .


 When the robbers finished their plunder ,a young man of 25 years age sprang up from his sit like a skillful athlete ,next to my sit across the aisle .To the surprise of the robbers he pulled the chain of the train and began to shout for help ,one of the robbers pointed his revolver to him .At that time he used his presence of mind to put out the light where he was standing ,fortunately the other passengers took the hint and followed the young man .The entire compartment was thrown into darkness ,taking advantage of the darkness all the passengers counter attacked the robbers and manage to tie them with the luggage rope ,after a few minutes the guards rushed into our compartment with Railway Protection Force ,finally the robbers were arrested and the train resumes her journey .She reached Asansol station late by one hour.       

3 ways to reduce water pollution.

 Some General Ways to Prevent Water Pollution.
  • If you can, pick up litter and garbage by hand, and take it to your personal garbage can before it travels into local waterways.
  • Never put chemicals down the drain. Place them into your outside garbage can or take them to the local authorized center.
  • Wash your car where the water and soap can go to a dirt or grass area instead of a street and drain to the river or creek.

Its entertaining.