Professional Documents
Culture Documents
Yash Java
Yash Java
Micro Project
Academic Year (2021-22)
Maharashtra State Board of Technical Education
Program code and name: CO
Subject: Programming in java
A Micro Project on
Guss Number Game
Sr. Roll No. Student Name Enrollment No. Seat No.
1 Yash Botre 2016240019
2 Om Markad 2016240017
Under Guidance of
Ms. Kajal Gade Mam …
Maharashtra State Board of Technical Education
Certificate
This is to certify that Mr. Yash Botre……. Roll No….. Of fourth
Semester of Diploma in Computer Engineering of Institute, Siddhant
college of Engineering (Code: 1624) has completed the Practical
Activities (PA) satisfactorily in Course java Programming (code:
22412) for the academic year 2021 – 2022 as prescribed in the
curriculum.
Certificate
This is to certify that Mr. Om Markad……. Roll No….. Of fourth
Semester of Diploma in Computer Engineering of Institute, Siddhant
college of Engineering (Code: 1624) has completed the Practical
Activities (PA) satisfactorily in Course java programming (code:
22412) for the academic year 2021 – 2022 as prescribed in the
curriculum.
This would not have been possible without the guidance and
help of many people. This is the only page where we have the
opportunity of expressing our emotions and gratitude from the
core of our heart to them. This project would not have been
successful without enlightened ideas, timely suggestions and
interest of our most respected guide Of Ms. Kajal Gade mam
without her best guidance; this would have been an impossible
task to complete.
5 Conclusion
6 Reference
Abstract
This Guess the number game can be played easily and need
only one player because on the other end there will be a
computer playing with you.
Random () method is used to pick a random number. Random
number extent (100); here 100 denotes that the random number
range will be bounded by 100.
int turn is initialized to zero so that it can count the number of
turns user has used to guess the right answer. For each iteration,
the value of turn will be increased by 1 as we put turn++ in our
loop.
Introduction
I will be sharing the number guessing game in java with source
code. As the name suggests, the player needs to guess the
number between two given numbers.
import javax.swing.*;
public class aa
{
public static void main(String[] args)
{
int computerNumber = (int) (Math.random()*100
+ 1); int userAnswer = 0;
System.out.println("The correct guess would be " +
computerNumber); int count = 1;
}
Out Put
Conclusion
Now using a loop, take K input from the user and for each input
print whether the number is smaller or larger than the actual
number.
If within K trials the user guessed the number correctly, print that
the user won.
Else print that he was not able to guess and then print the actual
number.
Reference
www.google.com
www.w3schools.com
www.codecamp.org
www.programmingboss.com