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

  Java-s ability to derive new fonts from existing ones

Find out where on your system these font libraries are located. When you do, please specify the operating system and the location (folder/directory) where you found them. Discuss Java's ability to derive new fonts from existing ones.

  What is relationship between hashing and digital signatures

The security advantages of using two-factor authentication, such as the integrated fingerprint reader in the more recent iPhone models, particularly to support internet services (such as online banking)

  Write a program to read a file and encode

Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name

  Develop class which implements interface

Let the ADT called SquareMatrix. (The matrix can be represented by 2-D array of ints w/ n rows and n columns.) Write specification for ADT as Java interface. Develop the class which implements interface.

  Write java program to find calories-conditional operator

Write down the answer for this program? Write down Java program (use Conditional (? Operator) which suggests number of calories a person must eat each day.

  Implement a fish-lake simulation

Implement a Fish/Lake simulation similar to the previous assignment. You will then make adjustments to accommodate class hierarchies and make use of inheritance as well as a JAVA interface.

  Multiplexors whose control bit allows you

Design a 4-bit up/down counter that has 2 to 1 multiplexors whose control bit allows you to select between one of two counting modes up or down

  Java program to compare two variables if they are equal

Write down program which will ask user to initialize two character arrays, program must compare two variables if they are equal.

  Test the invoice application

Study the error message and note the line number in the statement in the InvoiceApp class that caused the crash. Then click on the link to that line of the code.

  A jsp expression can contain any java expression

A JSP expression can contain any Java expression that evaluates to a

  Create three classes for a customer

a travel manager and have a job of buying a travel package for a customer. You must create three classes for this programming challenge: Customer, Ticket, and TravelManagerDemo.

  Write java program to print price of table-furniture company

Write down the Java program for furniture company. Ask user to select P for Pine, O for Oak or M for Mahogany. Illustrate the price of table produced with chosen wood.

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