This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11695 - import java.util.*; public class GeneralCalculation { static Scanner reader = new Scanner(System.in); public static void main(String[] args) { int Spearman, Slinger, Swordman, Planx, Archer, Sniper, Giro, Giant, Bomber, Ram, Catapult, Mortar, Doctor, Cook
Summary: import java.util.*; public class GeneralCalculation { static Scanner reader =...
Status: VERIFIED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML Canvas 2D Context (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-07 20:21 UTC by contributor
Modified: 2011-08-04 05:03 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2011-01-07 20:21:21 UTC
Specification: http://dev.w3.org/html5/spec/Overview.html
Section: http://www.whatwg.org/specs/web-apps/current-work/complete.html#top

Comment:
import java.util.*;
public class GeneralCalculation
{
static Scanner reader = new Scanner(System.in);
public static void main(String[] args)
{
int Spearman, Slinger, Swordman, Planx, Archer, Sniper, Giro, Giant, Bomber,
Ram, Catapult, Mortar, Doctor, Cook;
int RamShip, PaddleWheelRam, BallistaShip, FireShip, MortarShip, CatapultShip,
DivingShip;
double totalLand, totalSea, total;
System.out.println("כמה נושאי חנית יש לך?");
Spearman = reader.nextInt();
System.out.println("כמה קלעים יש לך?");
Slinger = reader.nextInt();
System.out.println("כמה נושאי חרב יש לך?");
Swordman = reader.nextInt();
System.out.println("כמה פלנקסים יש לך?");
Planx = reader.nextInt();
System.out.println("כמה קשתים יש לך?");
Archer = reader.nextInt();
System.out.println("כמה רובאים יש לך?");
Sniper = reader.nextInt();
System.out.println("כמה גירוקוטפרים יש לך?");
Giro = reader.nextInt();
System.out.println("כמה ענקי קיטור יש לך?");
Giant = reader.nextInt();
System.out.println("כמה מפציצים יש לך?");
Bomber = reader.nextInt();
System.out.println("כמה איילי ניגוח יש לך?");
Ram = reader.nextInt();
System.out.println("כמה קטפולות יש לך?");
Catapult = reader.nextInt();
System.out.println("כמה מרגמות יש לך?");
Mortar = reader.nextInt();
System.out.println("כמה רופאים יש לך?");
Doctor = reader.nextInt();
System.out.println("כמה טבחים יש לך?");
Cook = reader.nextInt();
totalLand = Spearman*0.6 + Slinger*0.4 + Swordman*1.2 + Planx*1.4 + Archer*1.1
+ Sniper*4 + Giro*2.5 + Giant*6.2 + Bomber*5.8 + Ram*4.4 + Catapult*10.2 +
Mortar*31 + Doctor*10 + Cook*4;
System.out.println("החיילים שלך שווים " + totalLand + "
גנרלים.");
System.out.println("~~~~~~~~~~");
System.out.println("כמה ספינות אייל ברזל יש לך?");
RamShip = reader.nextInt();
System.out.println("כמה ספינות אייל ברזל מושט יש
לך?");
PaddleWheelRam = reader.nextInt();
System.out.println("כמה ספינות בליסטרה יש לך?");
BallistaShip = reader.nextInt();
System.out.println("כמה ספינות להביור יש לך?");
FireShip = reader.nextInt();
System.out.println("כמה ספינות מרגמה יש לך?");
MortarShip = reader.nextInt();
System.out.println("כמה ספינות קטפולה יש לך?");
CatapultShip = reader.nextInt();
System.out.println("כמה צוללות יש לך?");
DivingShip = reader.nextInt();
totalSea = RamShip*5.4 + PaddleWheelRam*36 + BallistaShip*6.8 + FireShip*6.2 +
MortarShip*22.4 + CatapultShip*6.4 + DivingShip*18.2 ;
System.out.println("הצי הימי שלך שווה " + totalSea + "
גנרלים.");
System.out.println("~~~~~~~~~~");
total = totalLand + totalSea;
System.out.println("הצבא שלך שווה בסך הכל " + total + "
גנרלים." );
System.out.println(" ");
System.out.println("קרדיט ל-eliranisrael, יוצר הקוד.");
}

} 

__________________


Posted from: 109.65.203.17
Comment 1 Michael[tm] Smith 2011-08-04 05:03:33 UTC
mass-move component to LC1