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 program that reads an input

Create a java program that reads an input of n lines with the first line being the number of people in the contest and the remaining lines a numeric 9 digit code for each person that gets a vote

  What is an example of a javascript framework in the

what is an example of a javascript framework? in the framework you have described what is an example of an application

  Consider the problem of finding the position

Consider the problem of finding the position, p, of the last occurrence of a given number, x, in an array, A. We thus want a function FindLast(A,n,x) with precondition

  Write java program that writes names to text file

Create an empty text file called myfile.txt. Write a Java program that writes your names to the text file created. If the file does not exist, include an exception handler for that error.

  Write java program to read in sequence of hourly temperature

Write down Java program which reads in sequence of hourly temperature readings over 24-hour period using arrays. Your program must find and show maximum and minimum temperatures.

  Design an application for pizza order process

Create an application to take and procedure a pizza order. The user should be able to make pizza order choices from listboxes, and the application should show the order price.

  Latin squares - puzzle

Solve button causes the program to display a single solution by using only the symbols from the top row of six text fields in such a way that the non-empty grid symbols are not altered.

  Implementation of encryption and steganography in java

This is a project report showing the essential details and coding structures related with the implementation of encryption techniques and steganography in JAVA.

  Java program that allows the user to enter a letter

Write a java program that allows the user to enter a letter (as a code) and a real number (as the radius of a circle). If the letter is 'A' your program must calculate the area of the circle. If the letter is 'C' your program must calculate the ci..

  T an array using insertion sort and track the number of swap

How to sort an array using insertion sort and track teh number of swaps during the sorting

  Write an application to calculate the salespersons salary

Write an application that prompts the user to enter the sales for each employee, then it calculates the salesperson's salary. The process repeats until the user finishes entering all employees' information.

  Scanning and parsingimplement the lexical and syntactic

scanning and parsingimplement the lexical and syntactic analysis of minifun programming language. the scanner splits up

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