Determine whether the five-digit input was odd or even

Assignment Help JAVA Programming
Reference no: EM13694956

Problem: Write an application (SpaceDigits) that:

a. inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each. For example, if the user types in the number 42339, the program should print "4 2 3 3 9."

(Hint: Because the number input is five digits long, dividing it by 10000 gives the leftmost digit. digit1 = number / 10000 )

b. determines whether the five-digit input was odd or even.

Assume that the user enters the correct number of digits.
Sample Output:
Enter five digit integer: 12345
This integer is odd.
Digits in 12345 are 1 2 3 4 5

I'm not sure how to solve the question. Can anyone help me?

Reference no: EM13694956

Questions Cloud

What is the concentration at the same downwind distance : Assuming that the answer to part (a) above is exactly 50.0 ?g/m3, what is the concentration at the same downwind distance but at a cross-wind distance of 500 m off the centerline? Give your answer in g/m3.
What is the solubility of calcite : Problem- What is the solubility of calcite, CaCO3, in grams per milliliter of solution at a temperature where Ksp = 9.9 x 10^-9
Is the dissolution of srso4 exothermic or endothermic : Problem- Ksp for SrSO4 increases from 2.8 x 10^-7 at 37 degrees celsius to 3.8 x 10^-3 at 77 degrees Celsius. Is the dissolution of SrSO4 exothermic or endothermic
What is the concentration of ammonia in a solution : Problem- What is the concentration of ammonia in a solution if 22.23 ml of 0.1145 M HCl is needed to titrate to the equivalence point of a 100.00 ml sample of the solution
Determine whether the five-digit input was odd or even : inputs one number consisting of five digits from the user, separates the number into its individual digits and prints the digits separated from one another by three spaces each.
Calculate t, w, and l for a 340 base pairs : Problem- Calculate T, W, and L for a 340 base pairs closed circular plasmid with 3 negative supercoils. Assume the DNA remains entirely B-form
How many milliliters of hydrogen gas at 800mmhg : Problem- If you have 4.25 grams of zinc and 5.0L of 0.3500M hydrochloric acid, how many milliliters of hydrogen gas do you produce at 350K and 800mmHg
Find a shortest-path from u to v : find a shortest-path from u to v, and we have a *valid* heuristic, i.e.: For every node w, we have a value a(w) such that the distance from w to v in G is at least a(w) for all nodes w.
Two solutions used in atomic absorption measurements : Problem- Two solutions used in atomic absorption measurements with an acetylene/air flame contain equal concentrations of calcium. For each of the conditions given below

Reviews

Write a Review

JAVA Programming Questions & Answers

  The main method must repeatedly have the use

After the method is defined, the main method must repeatedly have the user enter 3 integers, call the triangleType method and display the return type. Be sure not to have an infinite loop by allowing the user to quit.

  Write the bubble sort

The village of Marengo conducted a census and collected records that have household data, including the number of occupants in each household.

  Write program using a switch statement that display polygon

Write a program using a switch statement that displays the name of a polygon with sides between 3 and 12 depending on the number entered by the user

  Method splitstack that takes a stack

Write a method splitStack that takes a stack of integers as a parameter and splits it into negatives and non-negatives. The numbers in the stack should be rearranged so that all the negatives appear on the bottom of the stack and all the non-negat..

  Create a two dimensional integer array in java

Create a two dimensional integer array in JAVA that produces the sum of rows and columns as selected by the user.

  Promgraming 1 1 there are many different concepts

1. 1 there are many different concepts associated with oop object-oriented programming like class

  Information from the user and prints a payroll statement

Write a program that accepts the following information from the user and prints a payroll statement

  Write a java program that draws a square abcd

Write a java program that draws a square ABCD. The points A and B are arbitrarily specified by the user by clicking the mouse button. The orientation of the points should be counter-clockwise

  Public float usefulload()

public float usefulLoad() // this is the grossWeight - emptyWeight public float usefulLoadWithFuel( in gallons ) // this is the useful load - gallons x 6. The programmer user will pass in the number of gallons on board.

  Java application that calculates the body mass index

Write a Java application that calculates and displays the body mass index (BMI) for N people

  Write down a java program which reads a text file called

write a java program which reads a text file called mydata.txt containing the following numbers 23 18 78 64 28 39 92 93

  If there are 4 command line arguments

If there are 4 command line arguments (a b c filename.dat) then the engine should take a,b,c and store the resulting x1 and x2 in filename.dat working in silent mode (no use of screen)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd