//full name:
//username:
//collaborator(s):

class Lab3 {

 public static void main(String[] args) {

  // Problems are based upon problem R4.1, R4.2, R4.3...
  // This template sets up the framework, to get credit you must use this
  // template.
  // A single test case is not sufficient to prove that it works for all
  // cases. So we encourage you to make your own test cases
  // You MUST keep the definitions of each problem as specified below 
  // Here are a couple of sample tests to get you started.
  System.out.println(example());// should OUTPUT: "1 2 3 4 5 6 7 8 9 10"
  System.out.println(r41a(20)); // should OUTPUT: "1 1 4 9 16"
  System.out.println(r41a(60)); // should OUTPUT: "10 20 30 40 50"
  System.out.println(r43a());   // 
  // ...
 }

 // Example Problem: Print out the numbers from 1 to 10
 public static String example() {
  // initialize String *answer* to be an empty string
  String answer = "";
  // initialize variable *i* to be an int with value 0
  int i = 0;

  // Loop while i is < 10
  while (i < 10) {
   // increase i by 1
   i++;
   // concatenate the value of *i* and a space on to *answer*
   answer += i + " ";
  }
  // remove the last space from the end of *answer*
  answer = answer.substring(0, answer.length() - 1);
  // return *answer*, which holds the "answer" to the problem
  return answer;
 }
 
  

 // ******************************
 // PROBLEM R 4.1
 // ******************************

 // Problem R4.1a
 public static String r41a(int n) {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.1b
 public static String r41b(int n) {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.1c
 public static String r41c(int n) {
  // START CODE
  return "";
  // STOP CODE
 }

 // ******************************
 // PROBLEM R 4.2
 // ******************************

 // Problem R4.2a
 public static int r42a() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.2b
 public static int r42b() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.2c
 public static int r42c() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.2d
 public static int r42d() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // ******************************
 // PROBLEM R 4.3
 // ******************************

 // Problem R4.3a
 public static String r43a() {
  // START CODE
  String answer = "iteration1: i=" + 0 + ", j=" + 1 + ", n=" + 2 ;
  answer += "\n";
  answer += "iteration2: i=" + 1 + ", j=" + 2 + ", n=" + 3 ;
  return answer;
  // STOP CODE
 }

 // Problem R4.3b
 public static String r43b() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.3c
 public static String r43c() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.3d
 public static String r43d() {
  // START CODE
  return "";
  // STOP CODE
 }

 // ******************************
 // PROBLEM R 4.4
 // ******************************

 // Problem R4.4a
 public static String r44a() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.4b
 public static String r44b() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.4c
 public static String r44c() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.4d
 public static String r44d() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.4e
 public static String r44e() {
  // START CODE
  return "";
  // STOP CODE
 }

 // Problem R4.4f
 public static String r44f() {
  // START CODE
  return "";
  // STOP CODE
 }

 // ******************************
 // PROBLEM R 4.10
 // ******************************

 // Problem R4.10a
 public static int r410a() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.10b
 public static int r410b() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.10c
 public static int r410c() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.10d
 public static int r410d() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.10e
 public static int r410e() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.10f
 public static int r410f() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // Problem R4.10g
 public static int r410g() {
  // START CODE
  return 0;
  // STOP CODE
 }

 // ******************************
 // PROBLEM R 4.15
 // ******************************

 // Problem R4.15
 public static int r415() {
  // START CODE
  int s = 0;
  for (int i = 1; i <= 10; i++) {
   s = s + 1;
  }
  // STOP CODE
  return s;
 }

 // ******************************
 // PROBLEM R 4.16
 // ******************************

 // Problem R4.16
 public static double r416(int n) {
  // START CODE
  double x = 0;
  double s;
  do {
   s = 1.0 / (1 + n * n);
   n++;
   x = x + s;
  } while (s > 0.01);

  // STOP CODE
  return x;
 }

}