Write a program that prompt the user to enter the two points

Assignment Help C/C++ Programming
Reference no: EM13963473

Project: Elementary Aspects of C++

a. Modulo Division Write a program to read in a 3-digit integer and print out the sum of the digits of the integer. Use the % operator to extrct the digits and use the / operator to extract the digit.

b. Approximating Pi: Pi can be computed using the formula 4 * (1.0 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 - . . .)

Write a program to display the result of 4 * (1.0 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13)

Note: be sure to use 1.0 not 1 in your program.

c. Wind Chill The National Weather Service has a relatively new formula to measure the wind chill temperature. The formula is

Wind Chill = 35.74 + 0.6215 T - 35.75 V0.16 + 0.4275TV0.16

Where T = outside temperature (°F) and V = wind velocity (mph). The formula cannot be used for wind speeds below 2 mph, temperatures below -58°F, or temperatures above 41°F.

Write a program that prompts the user to enter a temperature and a wind speed, and then displays the wind chill temperature. You may assume the values entered are valid.

Enter temperature (Fahrenheit): 5.3
Enter wind speed (mph): 6
The wind chill index is -5

d. Distance Given the two points (x1, y1) and (x2, y2), the distance between these points is given by the formula:

d= √[(x2-x1)2+(y2-y1)2]

Write a program that prompts the user to enter the two points, and then displays the distance between them. You may assume the values entered are valid.

Reference no: EM13963473

Questions Cloud

Handling the exception tl : Consider the function fun g(l) = hd(l) : : tl(l) handle Hd => nil; that behaves like the identity function on lists. The result of evaluating g(nil) is nil. Explain why. What makes the function g return properly without handling the exception Tl?
What is the primary potential problem with ethical egoism : In your opinion, what is the primary potential problem with Ethical Egoism as a moral theory? Explain
Spectrophotometric data for kmno4 : 1. Scenario: You are in in the lab and just created the graph for Data Table 1. After looking at the data, for which concentration of solution would you repeat the absorbance measurement if enough time was left in lab? Why?
How gains or losses on impaired assets : Explain how gains or losses on impaired assets should be reported in income in IFRS.
Write a program that prompt the user to enter the two points : Write a program that prompts the user to enter the two points, and then displays the distance between them. You may assume the values entered are valid.
Mickley company''s predetermined overhead rate : Mickley Company's predetermined overhead rate is $23.00 per direct labor-hour and its direct labor wage rate is $15.00 per hour. The following information pertains to Job
Result of evaluating : Consider the following functions, written in ML: exception Excpt of int; fun twice(f,x) = f(f(x)) handle Excpt(x) => x;
Which has the greater wavelength, blue light or red light : A photon corresponding to a particular frequency of blue light produces a transition from the n = 2 to the n = 5 level of a hydrogen atom. Could this photon produce the same transition (n = 2 to n = 5) in an atom of X? Explain.
Explain the implications of research on parental behavior : In your initial post of a minimum of 350 words, explain the implications of the research on parental behavior and environmental factors as they relate to human personality development. Describe how this research data might be used to explain unhea..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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