What data type would you use to store a phone number

Assignment Help Data Structure & Algorithms
Reference no: EM131136301

QUESTION 1

It costs 25 cents per mile to catch a taxi in Kalamazoo. There is a $4.00 charge, just to get in the car. There is also a special where it costs you 25 dollars to have an all day pass. Write a program that helps you calculate whether it would make more sense for you to pay per mile versus getting the all day pass. Your output should look like

It costs you X to travel this many miles. It would be be a better decision to [insert decision here]

Your decision would be it would make more sense to get the special if the per mile cost is > 25

QUESTION 2

If we list all of the numbers below 10 that are multiples of 3 and 5, we get 3,5,6 and 9. The sum of these is 23. Write a program that lists the sum of all multiples below 1000 that are divisible by 3 and 5.

QUESTION 3

How would you check if a response a user has provided to your program is an integer?

QUESTION 4

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

By considering the terms in the Fibonacci sequence whose values do not exceed 1000, print the values that are even numbers.

QUESTION 5

What data type would you use to store a phone number? A dollar amount?

QUESTION 6

What is the difference between a while loop and a do..while loop?

QUESTION 7

Write a program that asks a user for five grades. Your program should then calculate these grades and find the average. Based upon this average, you should tell them what their letter grade is (pending the normal grade scale of above a 90 = A, 80-90 = B, etc.

QUESTION 8

Create a program that asks the user for input. It should ask for a single number and then create the matching multiplication table for that number. For example, if the user enters the number 10, your output should look EXACTLY like the following

Muliplication Tables For 10

10 X 1 is 10
10 X 2 is 20
10 X 3 is 30
........
10 X 10 is 100

QUESTION 9

Name three different String functions that we have used

QUESTION 10

What two things do you need to use in order to ask a user for input?

QUESTION 11

How many times does the following run:

for(int x = 0;x<100;x++)
{
x++
x*=2
x--
}

Reference no: EM131136301

Questions Cloud

Describe major historical developments of the u.s. courts : Write a 1,050-1,400-word paper in which you describe the major historical developments of the U.S. courts. Be sure to outline the dual court system of the United States and analyze the correlation between the previously described historical develo..
Why might stock prices be a good predictor of recessions : Given this, why might stock prices be a good predictor of recessions?
Evaluate the character amanda for the themes : Explanation of Character Reports and how to determine your character and topic assignments for each play. For your assigned character and topic from The Glass Menagerie, complete the following in 200 words:
Explain the delegated powers of the executive : Explain the delegated powers of the executive. What is the difference between a treaty and an executive agreement? Define veto and pocket veto? How are they different? Explain the Executive Office of the President. Which agency is most important? Why
What data type would you use to store a phone number : What data type would you use to store a phone number? A dollar amount? What is the difference between a while loop and a do..while loop? What two things do you need to use in order to ask a user for input?
When might each of the following two rules be appropriate : Suppose that, as the chairman of the Fed, you decided to "put policy on automatic pilot" and require that monetary policy follow an established rule. When might each of the following two rules be appropriate?
Identify an educational issue within your school : For example, a school department may have to make a decision regarding a new textbook adoption. The issue in adopting the textbook is that it affects what curriculum will be taught in the classroom. It impacts how the curriculum will align with na..
What fiscal policy will be needed to put gdp on target : Explain why the government has to be so active in keeping GDP on target in this case.
Describe the ways bureaucrats can act as politicians : Describe the ways bureaucrats can act as politicians and policy makers. What is their role in the policy making process

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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