java


Java Error: Input cannot be resolved


I am new to Java. Please bear with me. I am trying a simple program. The number of dogs equal a certain amount of points. 4 or more dogs equal 60 points.
import java.util.Scanner;
public class Welcome {
public static void main(String[] args){
int dogs,points;
Scanner scan = new Scanner(System.in);
System.out.println("Enter the number of dogs: ");
int dogs = input.nextInt();
switch (dogs)
{
case 0:
System.out.println("You've earned 0 points!");
case 1:
System.out.println("You've earned 5 points!");
break;
case 2:
System.out.println("You've earned 15 points!");
break;
default: System.out.println("You've earned 60 points!");
}
}
}
Any help will be appreciated.

import java.util.Scanner;
public class Welcome {
public static void main(String[] args) {
int dogs;
Scanner scan = new Scanner(System.in);
System.out.println("Enter the number of dogs: ");
dogs = scan.nextInt();
switch (dogs) {
case 0:
System.out.println("You've earned 0 points!");
break;
case 1:
System.out.println("You've earned 5 points!");
break;
case 2:
System.out.println("You've earned 15 points!");
break;
case 3:
System.out.println("You've earned 30 points!");
break;
case 4:
System.out.println("You've earned 60 points!");
break;
default:
System.out.println("You've earned 60 points!");
}
}
}


Related Links

JGAP IntegerGene returning null on calling getAllele() method
How to delete a color of an image with JavaFx (make the background transparent)?
Spring MVC- Storing and Retrieving #PathVariable Map<String, String>
NoSuchElementException Error in Java [duplicate]
Sorting ArrayList by specific value
Parallel Processing Java Collection
Jenkins Parameterized Remote Trigger Plugin error“JSONArray[0] is not a JSONObject.”
For xlsx cell data when converting to CSV using apache POI
Java rotating logs with constant header
Not able to debug from one web app to another web app
One-to-one mapping where primary key is foreign key - what annotations are required
Splitting an arraylist java
Passing an Array to Different Class…Netbeans Java [duplicate]
Filtering a list during search modifies original data source
Parse Migration [closed]
Creating a Threadpool or Executor Service from a Object Collection

Categories

HOME
java
ionic-framework
netbeans
isabelle
deezer
heroku
path-finding
google-play
view
session
cplex
youtube-dl
webpack-2
ravendb
paradox
metatrader4
floating-action-button
spring-tool-suite
n-gram
static-libraries
openedx
clickonce
orleans
excel-2007
one-to-many
cas
wtx
libssl
subdomains
newline
junit5
semantic-versioning
calibre
pim
usbserial
protovis
ghost4j
wallpaper
mapbox-gl
sequential
dartium
adobe-premiere
serve
withings
android-fingerprint-api
elasticsearch-plugin
mapzen
galen
businessworks
thin
btrace
babel-core
avconv
flickr-api
dotcover
smartcontracts
tropo
sybase-asa
capacity
flow-control
lync-client-sdk
django-scheduler
minimization
word-vba-mac
instant
grails-tomcat-plugin
radtreelist
clang-static-analyzer
ubuntu-10.04
master-slave
pickadate
livequery
cloudbees
jfugue
intellij-14
purge
kcachegrind
dundas
bridge.net
c++03
python-green
dia
jsonpickle
knuth
java.util.concurrent
javafx-webengine
asp.net-web-api-odata
terminfo
xojo
rtmfp
prettify
mysqltuner
ccss
eclipse-memory-analyzer
bitsharp
datawindow
dsn
cascalog
javaspaces
ocx
spring-portlet-mvc
external-accessory
coercion
pyinotify
wise
dentrix
mozilla-prism
dbal
lzh
document-conversion





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm