From dfcc6265be1606b235e07a40de4a7887aeaa3273 Mon Sep 17 00:00:00 2001 From: jifland Date: Thu, 22 Mar 2018 00:39:18 +0000 Subject: [PATCH 1/4] Create test --- jifland/test | 1 + 1 file changed, 1 insertion(+) create mode 100644 jifland/test diff --git a/jifland/test b/jifland/test new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/jifland/test @@ -0,0 +1 @@ + From 80cbe9a5939fc3e8a69006d7798c0a0aa3d80dab Mon Sep 17 00:00:00 2001 From: jifland Date: Thu, 22 Mar 2018 00:47:37 +0000 Subject: [PATCH 2/4] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ff2c855..e5dd70b 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,6 @@ I would like you to complete what you can prior to next Wednesday's Lecture. #### Recursion * Write a program that takes an integer, and prints the factorial of the integer. ex: 5 factorial is 5*4*3*2*1 -* Write a +* Write a program that will calculate the number of cannon balls in a trinagular pyramid that has the intered integer number of rows. +(Note: this means that any layer of the pyramid has an equalateral triangle of cannonballs. The top layer has 1 cannon ball, the one below that has 3, etc.) + From 491c112ea15668b70f3b068cd7c0d217e9b1daff Mon Sep 17 00:00:00 2001 From: jifland Date: Thu, 22 Mar 2018 00:49:21 +0000 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e5dd70b..943a060 100644 --- a/README.md +++ b/README.md @@ -21,4 +21,4 @@ I would like you to complete what you can prior to next Wednesday's Lecture. * Write a program that takes an integer, and prints the factorial of the integer. ex: 5 factorial is 5*4*3*2*1 * Write a program that will calculate the number of cannon balls in a trinagular pyramid that has the intered integer number of rows. (Note: this means that any layer of the pyramid has an equalateral triangle of cannonballs. The top layer has 1 cannon ball, the one below that has 3, etc.) - +* Use recursion to determin if a string passed in is a palindrome. Your program will be given a string. From 96ad3212511ab70e95f3870c570b10bc048e716a Mon Sep 17 00:00:00 2001 From: bkeller17 <35274190+bkeller17@users.noreply.github.com> Date: Thu, 22 Mar 2018 01:54:13 +0000 Subject: [PATCH 4/4] Create FtoC --- bkeller17/FtoC | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 bkeller17/FtoC diff --git a/bkeller17/FtoC b/bkeller17/FtoC new file mode 100644 index 0000000..3208eca --- /dev/null +++ b/bkeller17/FtoC @@ -0,0 +1,16 @@ +import java.util.Scanner; + +public class LAB4Q2{ +public static double ConvertFtoC(int Input){ + return (Input-32) * 5/9.0; +} + public static void main(String [] args) + { + Scanner scan = new Scanner(System.in); + int input = scan.nextInt(); + + int F = input; + + System.out.println(ConvertFtoC(F)); + } +}