Академический Документы
Профессиональный Документы
Культура Документы
import java.util.Scanner;
class SolarSystem
for(int i=0;;i++)
System.out.println();
System.out.println();
System.out.println();
System.out.println("To see the list of all the planets of the solar system, enter 02");
System.out.println("To play the Solar System Quiz game, Let's Take a Quiz, enter 04");
System.out.println();
System.out.println();
String str=S.next();
num1=str.charAt(0);
num2=str.charAt(1);
switch(num1)
2
case '0':
switch(num2)
case'0':System.exit(0);
case '1':
System.out.println("Solar System.");
System.out.println("Of those objects that orbit the Sun directly, the largest eight
are the planets,with the remainder being significantly smaller objects, such as dwarf planets and
small Solar System bodies.");
System.out.println("Of the objects that orbit the Sun indirectly, the moons, two
are larger than the smallest planet, Mercury.");
System.out.println("Stars: 1 (Sun)");
System.out.println();
break;
case '2':
System.out.println("");
System.out.println("");
System.out.println("Mercury");
System.out.println("Venus");
System.out.println("Earth");
System.out.println("Mars");
System.out.println("Jupiter");
System.out.println("Saturn");
System.out.println("Uranus");
System.out.println("Neptune");
break;
case '3':
System.out.println();
System.out.println();
System.out.println();
System.out.println();
char num3;
String str1=NS.next();
num3=str1.charAt(0);
System.out.println();
System.out.println();
if(num3=='A'||num3=='a')
System.out.println();
System.out.println();
if(num3=='B'||num3=='b')
System.out.println();
System.out.println();
if(num3=='C'||num3=='c')
System.out.println();
System.out.println();
if(num3=='D'||num3=='d')
System.out.println();
System.out.println();
System.out.println("6. Day: Just more than one Earth day (24 hours, 37
minutes)");
if(num3=='E'||num3=='e')
{
7
System.out.println();
System.out.println();
System.out.println("1. The fifth planet from the sun, Jupiter is huge and is
the most massive planet in our solar system.");
if(num3=='F'||num3=='f')
System.out.println();
System.out.println();
System.out.println("1. The sixth planet from the sun is known most for its
rings.");
if(num3=='G'||num3=='g')
System.out.println();
System.out.println();
if(num3=='H'||num3=='h')
System.out.println();
System.out.println();
if(num3!='A'&&num3!='a'&&num3!='B'&&num3!='b'&&num3!='C'&&num3!='c'&&nu
m3!='D'&&num3!='d'&&num3!='E'&&num3!='e'&&num3!='F'&&num3!='f'&&num3!='G'&&
num3!='g'&&num3!='H'&&num3!='h')
break;
case '4':
int score=0;
System.out.println();
System.out.println();
System.out.println("Question 1");
System.out.println();
System.out.println();
char n1;
String S1=NS1.next();
n1=S1.charAt(0);
System.out.println();
System.out.println();
if(n1=='B'||n1=='b')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
System.out.println();
System.out.println();
11
System.out.println("Question 2");
System.out.println("A. Hurricanes");
System.out.println();
System.out.println();
char n2;
String S2=NS2.next();
n2=S2.charAt(0);
System.out.println();
System.out.println();
if(n2=='B'||n2=='b')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
}
12
System.out.println();
System.out.println();
System.out.println("Question 3");
char n3;
String S3=NS3.next();
n3=S3.charAt(0);
System.out.println();
System.out.println();
if(n3=='D'||n3=='d')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
System.out.println();
System.out.println();
System.out.println("Question 4");
System.out.println("A. A Crater");
System.out.println("B. A Lake");
System.out.println("C. A Storm");
System.out.println("D. A Volcano");
char n4;
String S4=NS4.next();
n4=S4.charAt(0);
System.out.println();
System.out.println();
if(n4=='C'||n4=='c')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
System.out.println();
System.out.println();
System.out.println("Question 5");
System.out.println("A. Venus");
System.out.println("B. Earth");
System.out.println("C. Jupiter");
System.out.println("D. Uranus");
char n5;
String S5=NS5.next();
n5=S5.charAt(0);
System.out.println();
System.out.println();
if(n5=='D'||n5=='d')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
System.out.println();
System.out.println();
System.out.println("Question 6");
System.out.println("A. Mercury");
System.out.println("B. Venus");
System.out.println("C. Earth");
System.out.println("D. Mars");
char n6;
String S6=NS6.next();
n6=S6.charAt(0);
System.out.println();
System.out.println();
if(n6=='A'||n6=='a')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
System.out.println();
System.out.println();
System.out.println("Question 7");
System.out.println("A. Jupiter");
System.out.println("B. Earth");
System.out.println("C. Mars");
System.out.println("D. Venus");
char n7;
String S7=NS7.next();
n7=S7.charAt(0);
System.out.println();
System.out.println();
if(n7=='C'||n7=='c')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
17
System.out.println();
System.out.println();
System.out.println("Question 8");
System.out.println("A. 2");
System.out.println("B. 50");
System.out.println("C. 12");
System.out.println("D. 1");
char n8;
String S8=NS8.next();
n8=S8.charAt(0);
System.out.println();
System.out.println();
if(n8=='A'||n8=='a')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
18
System.out.println();
System.out.println();
System.out.println("Question 9");
System.out.println("A. Jupiter");
System.out.println("B. Earth");
System.out.println("C. Uranus");
System.out.println("D. Mercury");
char n9;
String S9=NS9.next();
n9=S9.charAt(0);
System.out.println();
System.out.println();
if(n9=='D'||n9=='d')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
19
System.out.println();
System.out.println();
System.out.println("Question 10");
System.out.println("B. Rock");
System.out.println("C. Gas");
char n10;
String S10=NS10.next();
n10=S10.charAt(0);
System.out.println();
System.out.println();
if(n10=='C'||n10=='c')
System.out.println("Correct answer!");
score=score+1;
else
System.out.println("Wrong answer!");
20
System.out.println();
System.out.println();
}
21
Output
22
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
01
Solar System.
The Solar Systemis the gravitationally-bound system comprising the Sun and the objects that
orbit it, either directly or indirectly.
Of those objects that orbit the Sun directly, the largest eight are the planets,with the remainder
being significantly smaller objects, such as dwarf planets and small Solar System bodies.
Of the objects that orbit the Sun indirectly, the moons, two are larger than the smallest planet,
Mercury.
Nearest stars: Proxima Centauri (4.22 ly) and Alpha Centauri (4.37 ly)
Stars: 1 (Sun)
Known planets: 8 (Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune)
23
Known dwarf planets: Possibly several hundred; five currently recognized by the IAU(Ceres,
Pluto, Haumea, Makemake, Eris)
Known natural satellites: 472 (175 planetary and 297 minor planetary)
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
02
Mercury
Venus
Earth
Mars
Jupiter
24
Saturn
Uranus
Neptune
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The closest planet to the sun, Mercury is only a bit larger than Earth's moon.
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The second planet from the sun, Venus is terribly hot, even hotter than Mercury.
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The third planet from the sun, Earth is a waterworld, with two-thirds of the planet covered by
ocean.
2. It’s the only world known to harbor life. Earth’s atmosphere is rich in life-sustaining nitrogen
and oxygen.
3. The planet zips around the sun at more than 18 miles per second (29 km per second).
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The fourth planet from the sun, is a cold, dusty place. The dust, an iron oxide, gives the planet
its reddish cast.
6. Day: Just more than one Earth day (24 hours, 37 minutes)
30
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The fifth planet from the sun, Jupiter is huge and is the most massive planet in our solar
system.
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The sixth planet from the sun is known most for its rings.
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
1. The seventh planet from the sun, Uranus is an oddball. It’s the only giant planet whose equator
is nearly at right angles to its orbit — it basically orbits on its side.
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
03
35
1. The eighth planet from the sun, Neptune is known for strong winds — sometimes faster than
the speed of sound.
2. Discovery: 1846
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
04
Question 1
Correct answer!
Question 2
A. Hurricanes
B. Dust Storms
C. Sand Storms
D. Tidal Waves
Correct answer!
Question 3
Correct answer!
Question 4
A. A Crater
B. A Lake
C. A Storm
D. A Volcano
Correct answer!
Question 5
A. Venus
B. Earth
39
C. Jupiter
D. Uranus
Wrong answer!
Question 6
A. Mercury
B. Venus
C. Earth
D. Mars
Correct answer!
Question 7
The largest volcano in the solar system is called Olympus Mons. Where is it??
A. Jupiter
B. Earth
40
C. Mars
D. Venus
Wrong answer!
Question 8
A. 2
B. 50
C. 12
D. 1
Wrong answer!
Correct Answer is A. 2
Question 9
41
A. Jupiter
B. Earth
C. Uranus
D. Mercury
Wrong answer!
Question 10
A. Molten Iron
B. Rock
C. Gas
D. Liquid Lava
Wrong answer!
To see the list of all the planets of the solar system, enter 02
To play the Solar System Quiz game, Let's Take a Quiz, enter 04
00