Find Jobs
Hire Freelancers

CoinFlip2

$10-15 USD

已完成
已发布大约 21 年前

$10-15 USD

货到付款
//[login to view URL] the program below so to display on screen each coin flip. //[login to view URL] two boolean variables with he second variable //to store the outcome of the flip. //[login to view URL] the user fails to enter heads or tails, have the program prompt //user to re-enter until the proper input is made (heads or tails or exit). //use jpb package for program operations (create a //folder called jpb and place the four attached zipped files //inside of it import jpb.*; public class Coinflip2 { public static void main (String[] args) { boolean headsWasSelected = false; // Prompt user to guess heads or tails [login to view URL]("Enter heads or tails: "); String userInput = [login to view URL](); if ([login to view URL]("heads")) headsWasSlected = true; else if (![login to view URL]("tails")) { [login to view URL]("Sorry, you didn't enter heads " + "or tails; please try again."); return; } //Choose a random number double randomNumber = [login to view URL]() ; //Determine whether user guessed correctly if (headsWasSelected && randomNumber < 0.5) [login to view URL](You win!"); else if (!headsWasSelected && randomnumber >= 0.5) [login to view URL]("You win!"); else [login to view URL]("Sorry, you loose."); } } ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. ## Platform Use Java code to import jpb package.
项目 ID: 2916293

关于此项目

2提案
远程项目
活跃21 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
颁发给:
用户头像
See private message.
$4 USD 在14天之内
5.0 (65条评论)
4.7
4.7
2威客以平均价$8 USD来参与此工作竞价
用户头像
See private message.
$12.75 USD 在14天之内
4.2 (111条评论)
4.4
4.4

关于客户

UNITED STATES的国旗
United States
5.0
59
会员自10月 3, 2001起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。