A | B | A ⋁ B |
---|---|---|
F | F | F |
F | T | T |
T | F | T |
T | T | T |
// Load required classes
import java.util.Scanner;
import java.io.File;
public class Conditionals{
public static void main(String[] args) throws Exception{
// Scanner variable
Scanner reader;
// If an argument is present, we are reading from a file
// specified in args[0]
if(args.length > 0){
reader = new Scanner(new File(args[0]));
// If no argument, read from System.in
}else{
reader = new Scanner(System.in);
}
int x = reader.nextInt();
System.out.println(x);
}
}
# Load required modules
import sys
# If an argument is present,
# we are reading from a file
# specified in sys.argv[1]
if len(sys.argv) > 1:
reader = open(sys.argv[1])
# If no argument, read from stdin
else:
reader = sys.stdin
x = int(reader.readline())
print(x)
// Load required classes
import java.util.Scanner;
import java.io.File;
public class Example{
public static void main(String[] args){
// Scanner variable
Scanner reader;
// If an argument is present,
// we are reading from a file
// specified in args[0]
if(args.length > 0){
reader = new Scanner(new File(args[0]));
// If no argument, read from System.in
}else{
reader = new Scanner(System.in);
}
/* -=-=-=-=- MORE CODE GOES HERE -=-=-=-=- */
}
}
Write a program that accepts a positive integer that represents a year...
Write a program that accepts a positive integer that represents a year...
int year = reader.nextInt();
Write a program that accepts a positive integer that represents a year...
int year = reader.nextInt();
Write a program that accepts a positive integer that represents a year...