Week 1
Week 1
import java.util.Scanner;
class agefindingforvote{
int age=tyson.nextInt();
if(age>=18)
else
import java.lang.System;
import java.util.Scanner;
class Divisibleby5
int ajai=sc.nextInt();
if(ajai%5==0)
else
import java.util.Scanner;
int n = sc.nextInt();
if(n < 0) {
else {
int factorial = 1;
int i = 1;
while(i <= n) {
factorial *= i;
Week 1
i++;
import java.util.Scanner;
int n = sc.nextInt();
if(n < 0) {
else {
int factorial = 1;
factorial *= i;
}
Week 1
import java.util.Scanner;
class findingthenumber{
int number=tyson.nextInt();
if(number==0)
System.out.print("Zero");
else if(number>0)
System.out.print("Positive");
else
System.out.print("Negative");
import java.util.Scanner;
Week 1
class firstnumberisgratest{
int a=tyson.nextInt();
int b=tyson.nextInt();
int c=tyson.nextInt();
else
import java.util.Scanner;
class numberislargestthenthree
int a=tyson.nextInt();
Week 1
int b=tyson.nextInt();
int c=tyson.nextInt();
if(a>3)
else
if(b>3)
else
if(c>3)
else
}
Week 1
}import java.util.Scanner;
System.out.println(counter);
System.out.println("Rocket lunched");
import java.util.Scanner;
System.out.println(i);
System.out.println("Rocket Lunched");
import java.util.Scanner;
class SpringSeason {
} else {
import java.util.Scanner;
class sumofnaturalnumbers{
int n=tyson.nextInt();
int a=0;
if(n>=0)
a=n*(n+1)/2;
else{
import java.util.Scanner;
class sumofnaturalnumbers{
int n=tyson.nextInt();
int a=0;
if(n>=0)
a=n*(n+1)/2;
else{
import java.util.Scanner;
int n = sc.nextInt();
if(n <= 0) {
}
Week 1
else {
int sumForLoop = 0;
sumForLoop += i;
int sumFormula = n * (n + 1) / 2;
if(sumForLoop == sumFormula) {
else {
import java.util.Scanner;
double number;
// Use while loop to keep asking for input until user enters 0
while(true) {
if(number == 0) {
total += number;
import java.util.Scanner;
double number;
while(true) {
if(number <= 0) {
total += number;