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

  What-if analysis and problem optimisation

Perform a what-if analysis to determine the maximum total profit that could be achieved if only rye (no wheat) is planted, given the cost and time constraints.

  What is the data type

What is the data type and What is the type of the parameter

  Calculate failure and success ratios using fifo page removal

Using FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). Then calculate the failure and success ratios.

  Given algorithm looks for a value in a nondecreasing sequenc

Given algorithm looks for a value in a nondecreasing sequence and returns the index of the value if it is found or 0 if it is not found.

  What is highest number of messages sent by correct processes

What is the highest number of messages sent by correct processes in Algorithm 15.4 in executions that decide on O? Answer both for the case where the general is correct and the case where the general is faulty.

  Algorithm to decide flavor of ice cream

A group of ten people need to decide which one flavor of ice cream they will all order, out of three options. The algorithm can question and re-question the participants, and present the answers to the participants.

  Users and it organizations arm against phishing attacks

How users and IT organizations must arm themselves against these attacks?

  Describe the steps that would use in order to convert data

Describe the steps that you would use in order to convert database tables to the First Normal Form

  Development activities and configuration management

Development Activities and Configuration Management

  Data structures assignment requiring c++ program

You should build enough new roads such that if City A was reachable from City B via some old roads, City A must be reachable from City B via some new roads.

  Finding the values of queuefront and queuerear

Assume that queue is a queue type object and the size of the array-implementing queue is 100. Also, assume that the value of the queueFront is 25 and the value of queueRear is twenty-five.

  Discuss simulations and its types

Discuss simulations and its types? Discuss inheritance, its benefits and types? Discuss any one of the following relationship with an example: Is-a, As-a and Has-a.

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