Reference no: EM13940973
I have to write an interactive program that will find the Greatest common divisor between two inputted integers.
Here is what i have so far.
//
//
//
// This Program will find the greatest common divisor between two inputted integers.
//
//
import java.io.*;
public class space11{
static BufferedReader keyboard =
new BufferedReader( new InputStreamReader(System.in));
public static void main(String args[]) throws IOException{
System.out.println();
System.out.println();
int divisor;
int small_number, larger_number;
System.out.println("This Program will fins the GCD between two numbers");
System.out.println();
System.out.print("Please enter the first number here: ");
first_number = Integer.parseInt(keyboard.readLine().trim());
System.out.println();
System.out.print("Please enter the second number here: ");
second_number = Integer.parseInt(keyboard.readLine().trim());
System.out.println();
for ( divisor = 2 ; divisor <= small_number; divisor++);
{
if ( small_number % divisor == 0 && larger_number % divisor ==0)
Discuss the various logistical issues
: Discuss the various logistical issues you would have to consider before commencing the import of products from the two new factories, taking into account the various procedures that need to be considered,
|
Search for organisations interested in its purchase
: M J Morris is a prosperous unquoted company, whose owners are also the directors. The directors have decided to sell their business, and have begun a search for organisations interested in its purchase. They have asked for your assessment of the p..
|
Provide the journal entry for december
: Prepare a bond amortization table assuming straight-line amortization. Provide the journal entry for December 31, 2010.
|
What is the expected value of earning a college degree
: If the lifetime earnings of a high-school graduate average $1,200,000, what is the expected value of earning a college degree?
|
Find the greatest common divisor between two inputed integer
: I have to write an interactive program that will find the Greatest common divisor between two inputted integers.
|
How much gasoline per year is being converted
: How much money can be saved for 15,000 miles of driving per year and how much gasoline per year is being converted if one million people use the E20 fuel?
|
Preparing a complete statement of cash flows
: Preparing a Complete Statement of Cash Flows. The following information is also available for 2008: Plant assets were sold for their book value of $180 during the year. The assets had an original cost of $290
|
What is a performance management system
: 1. What is a performance management system? 2. List 5 of the strategic purposes an organization may have for their performance management system.
|
Did tyler make the most economical decision
: Did Tyler make the most economical decision? What other options should Tyler have explored? In your answer, be sure to state your assumptions and quantify your thinking.
|