A PHP Error was encountered

Severity: Warning

Message: fopen(/tmp/ci_sessionpi29pjd49dtguc546kmmtbpl5a21ibmu): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 176

Backtrace:

File: /var/www/html/application/controllers/Project.php
Line: 10
Function: __construct

File: /var/www/html/index.php
Line: 311
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Failed to read session data: user (path: /tmp)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /var/www/html/application/controllers/Project.php
Line: 10
Function: __construct

File: /var/www/html/index.php
Line: 311
Function: require_once

Coin Game Using Java | Rajesh
Coders Packet

Coin Game Using Java

By Rajesh Kolipaka

It is a simple game. In this Coin Game, the user guesses whether a flipped coin is head or tail.

Programming Language used: JAVA

 Aim of the program:

 Let the user guess whether a flipped coin is head or tail.

Functionality:

-->System will randomly generate an integer either 1 or 2 which represents head or tail.

-->The program prompts the user to enter a guess.

-->Reports the user whether WIN or LOSE if the guess is correct or wrong respectively.

-->Repeat the game until the user ends.

 About classes in the packet :

 Our code contains only a single class called "Main".

Note: We have import Random module from util package i.e. import java.util.Random;

 

Output:

code ourput

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Rajesh Kolipaka (Rajesh)

Download packets of source code on Coders Packet