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

  Design an adt for a two color double stack

Design an adt for a two color double stack adt that consists of two stacks one red and one blue and has its operations color coded versions of the regular stack adt operations.

  Enter the last names of five candidates

Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by each candidate. The program should then ouput each candidate's name, votes received by that candidate.

  Determinethe assymtotic complexity

Determinethe assymtotic complexity (Big Theta) int terms of n (not sum) for the following code fragment in the average case.

  Display the array

In this lab, please complete a given program to perform the following tasks: 1.Allocate a 10 by 5 2D byte array dynamically. The way of allocation must be consistent with page 39 in chap9.ppt. Each element is a byte. 3.Display the array.

  Give and compare the heights of the two trees

- First insert them sequentially into a binary search tree. - Next reinsert them into an empty AVL tree, restoring the AVL property after each insertion. Show the AVL tree which results after each insertion.

  Algorithm to compute binomial coefficients

Analyze the time taken by this algorithm under the unreasonable assumption that the addition C(n-1, k-1) + C(n - 1, k) can be carried out in constant time once both C(n-1, k-1) and C(n - 1, k) have been obtained recursively.

  Find the sum of the degrees of the vertices

Find the sum of the degrees of the vertices

  The number of operations executed by algorithms

The number of operations executed by algorithms A andB is 8nlogn and 2n 2 , respectively. Determine n 0  such that Ais better thanB for n ? n 0 .

  Propose an efficient data structure

Propose an efficient data structure that may hold the tour operator's data using a normalization process. Describe each step of the process that will enable you to have a 2nd Normal Form data structure.

  Determine which scheduling algorithms are best suited

Determine which scheduling algorithms (from the ones you researched in the Discussion Board assignment) are best suited for the enterprise you selected.

  Describe the use of a binary tree when searching for keys

question 1 discuss the use of a binary tree when searching for keys in an array. question 2 discuss the use of a binary

  System administrators database, network and application

What methods would you use to effectively manage a team of system administrators database, network, application working in your data center?

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