Answer:
google kis kam ka hai us se puch lo
Answer:
sum average and count is the answer
Answer:
see explaination
Explanation:
import java.io.*;
import java.util.Scanner;
public class Winners {
public static void main(String args[]) throws IOException {
Scanner sc = new Scanner(new File("WorldSeriesWinners.txt"));
String commands[] = new String[100000];
int c = 0;
while (sc.hasNextLine()) {
String input = sc.nextLine();
System.out.println(input);
if (input.isEmpty())
continue;
commands[c++] = input;
}
sc.close();
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter the name of a team: ");
String name = keyboard.nextLine();
int count = 0;
for (int i = 0; i < c; i++) {
if (commands[i] != null) {
if (commands[i].equals(name)) {
++count;
}
}
}
if(count!=0)
System.out.println(name + " has won the World Series in the time period from 1903 through 2018 " +count + " number of times" );
else
System.out.println("Team with name "+name+ " does not exists");
}
}
Answer:
True.
The code skips the else command
Explanation:
I will answer this question with the following code segment
<em>n = 1</em>
<em>If n > 0:</em>
<em> Print("greater than 0")</em>
<em>else:</em>
<em> Print("not greater than 0")</em>
<em />
From the code segment above
<em>Print("greater than 0")</em> will be executed because the condition <em>If n > 0 </em>is true
Since the if condition is true, the else condition will not be executed