Write a program that takes as input a number base

Assignment Help JAVA Programming
Reference no: EM131602832

Programming Project 1:

largest and smallest

- Write a program that reads an integer value n, then it reads in n integer values. Then it outputs the largest and the smallest of the n integer values.
- Example (in red the program outputs and in black the user inputs):
- How many numbers?
- 10
- Give me the 10 numbers
- 7, 21, 5, 12, 14, 2, 1, 34, 9, 6
- Smallest number is 1
- Largest number is 34
- Use either a for or a while loop.


Programming Project 2:
Hexadecimal numbers
- A Hexadecimal number is a number written in base 16 using as sixteen digits, 0 to 9 for the first 10, and A for 10, B for 11, C for 12, D for 13, E for 14, F for 15.
- For instance
- AB3=10×162+11×16+3×160=2739
- CAFE=12×163+10×162+15×161+14×160=51966
- Write a program that takes as input a number base 10 (example 51966) and it outputs the corresponding hexadecimal number (CAFE).


Programming Project 3:
Reversing a number

- Write a program that reads an integer value n, and then reverses its digits.
- Example (in red the program outputs and in black the user inputs):
- Give me the number
- 375
- Here's the number in reverse
- 573

- Use either a for or a while loop. Do not use arrays (you don't know what they are yet!) to hold the digits.

- Just note that, for example, to reverse 31, first you get 1, then you get 3 (second digit) and you add it to the first digit multiplied by 10, obtaining 3+1×10=13.

- To reverse 231, reverse the first 2 digits (as above) and then add the last digit 2, to the number obtained reversing the first 2 digits multiplied by 10, obtaining 2+13×10=132

Reference no: EM131602832

Questions Cloud

Persuade connectors to use their message : It must be positioned as newsworthy. Common themes defining newsworthiness often include the following:
Discussion-ethics in action : In 1980, the US Congress enacted the Comprehensive Environmental Response, Compensation, and Liability Act (CERCLA), commonly referred to as the Superfund.
Define the learning theory and the behavior of an individual : What is an example of a situation that demonstrates the relationship between the learning theory and the behavior of an individual
By what percent does the period change : Suppose now the length of the pendulum in Problem remains constant, but that the acceleration due to gravity changes.
Write a program that takes as input a number base : Write a program that reads an integer value n, and then reverses its digits - Write a program that reads an integer value n, then it reads in n integer values
What does your critical analysis of the website reveal : What does your critical analysis of the website reveal to you about Cindy Jackson's sense of her social self
Create implementation plan for the integration of a mis : Why would an organization want to create implementation plan for the integration of a MIS? Is this something that needs to be well thought out and, if so, why?
The key functional areas of human resources management : Examine four (4) federal equal employment opportunity laws. Suggest the primary manner in which each law influences fair employment practices.
Solve the new equation to get an approximate solution : Explain why the following equation has a solution near 0: et = 0.02t + 1.098

Reviews

Write a Review

JAVA Programming Questions & Answers

  Implement an uml to java code

Need to implement an UML to java code. Choose one of the two UML's and just implement. You are to implement someone else's design, namely, the design that you ranked first (although you are allowed to change your mind at any point if you wish)

  Create a computer program

Create a computer program that can solve word search puzzles - Your program will print all the words from the dictionary found in the puzzle.

  Develop an application that counts the number of words

Develop an application that counts the number of words, number of characters with spaces and without spaced

  Write program that reverses string with the in main function

Write a program that reverses a string with the In themain function, ask the user to enter a string and The entered string can be handled as C-string (or converted to C-string).

  Trying to write it java first and then pseudo code

A popular diversion in the United States, "word find" (or "word search") puzzles ask the player to find each of a given set of words in a square table filled with single letters. Trying to write it java first and then pseudo code

  What is a reserved word in java programming language

What is a reserved word in Java programming language? Method,native,subclasses,reference,array?

  Complete the loops to print the harshad numbers

Complete the loops to print the Harshad numbers in the range of 1 to 1000 - public class Harshad

  Cognitive-based approaches to understanding motivation

Compare and contrast the need-based and cognitive-based approaches to understanding motivation?

  Write a function named getaddress

Write a function named getTelNums that accepts an argument of type person and returns a string of telephone numbers for that person. getTelNums(p) => "212.555.1234 646.555.4567 541.502.1212 541.406.8765"

  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

  Shooting star

Initial project folder you will see the beginnings of a Driver - You need to implement that DoubleListOfBlock methods so they perform

  Define an enum type in the librarybook class

Define a class variable, totalTVs, whose purpose is to keep track of the total number of Television objects constructed during execution of a program that uses the Television class - Define an enum type in the LibraryBook class corresponding to the..

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