Program to compute with two numbers.

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

My program will do some computation with two numbers.

The two numbers used by this program are 22 and 16.

The Sum of 22 and 16 is 61
The Difference of 22 minus 16 is 11
The Product of 22 times 16 is 900
When 22 is divided by 16 you get 1 with remainder 11

If you have 22 nickels and 16 pennies you would have $2.05

Thank you for using this program.

I have the 1st two statements figured out, and had the arithmetic figured out based on results of 22 and 16, but turns out I interpreted it wrong and results should be what's posted above when the user changes the two numbers. The tutorial says not to use scanf or fflush. Should a put in code stating to Please enter a number? I am a little unsure of what to do about the float. I know to use the float and to put it as %.2f, but after that unsure. Any help would be appreciated. I will attach what I have. ( I am probably making this harder than it actually is). Oh, and should compile in C.

Attachment:- jk.zip

Reference no: EM13938902

Questions Cloud

Functions to compute the stress and strain in a steel rod : A function to output the stress and strain at different loads of P.
Abc corporation is considering an expansion project : ABC Corporation is considering an expansion project. The necessary equipment could be purchased for $29,388 and shipping and installation costs are another $717. The project will also require an initial $4,436 investment in net working capital. The c..
Find the npv and pi of a project that costs : Find the NPV and PI of a project that costs $1,500 and returns $800 in year one and $850 in year two. Assume the project's cost of capital is 8 percent.
What is your chosen firms competitive advantage : Write the essay on your chosen Multinational Enterprise. What is your chosen firm's competitive advantage? And is its competitive advantage sustainable in the long-term?
Program to compute with two numbers. : I have the 1st two statements figured out, and had the arithmetic figured out based on results of 22 and 16, but turns out I interpreted it wrong and results should be what's posted above when the user changes the two numbers. The tutorial says no..
Trade manual going to be between the us and canada : Trade Manual Research Paper. The trade manual is going to be between the US and Canada. The country is the US and its trading partner is Canada.
What is the total tax due : What is the total tax due for 2012, including self-employment tax, for Stuart, assuming that he earned $20,000 in wages, earned $24,000 in self-employment income from his first business,
Which four basic tissue types gives rise to most cancers : Cindy, an overweight high school student, is overheard telling her friend that she's going to research how she can transform some of her white fat to brown fat. What is her rationale here, assuming this is possible?
Analysis framework as organizing device to structure essay : You are only expected to use the prescribed four components of the star analysis framework as an organizing device to structure your essay.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  A temperature control system consists of four thermostats

A temperature control system consists of four thermostats controlling three heating units. The thermostat contacts are set to close at 50°, 60°, 70°, and 80°F, respectively. The PLC ladder logic program is to be designed so that at a temperature belo..

  Demonstrate your code compiles and runs for a test case

Use a For loop to iterate through the array and input the values. Demonstrate your code compiles and runs for a test case of your choice.

  Define the class bankaccount

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder's name (string), account number (int), account type (string, checking/saving), balance (double),..

  Compute the squares of the numbers in the array

Write a java program to find the number in the given list. Write a java program to find the location of an element in the list.

  Determines how many breaths a person has had in their life

Develop and test a program that determines how many breaths and how many heartbeats a person has had in their life. The average respiration (breath) rate of people varies with age.

  Determining the corresponding node labels

Use binary reflected Gray code (RGC) to determine how a 16-node linear array can be mapped to a 4-D hypercube. You must derive the 4-bit Gray codes and the corresponding node labels of a 4-D hypercube. Draw the mapping of the 16-node linear array ..

  Write the equation of the perpendicular bisector

Write a program to read the point and slope information for two lines and to determine whether they intersect or are parallel. If they intersect, find the point of intersection and also determine whether they are perpendicular.

  Worst-case and best-case running times

a. Write a pseudocode for this algorithm. b. What are the worst-case and best-case running times for this sorting algorithm?

  Write a fraction class whose objects will represent fraction

Write a fraction class whose objects will represent fractions. You should provide the following member functions: Two constructors, a default constructor which assigns the value 0 to the fraction, and a constructor that takes two parameters

  Prepare a simple game of blackjack using object oriented

prepare a simple game of blackjack using object oriented programming.uml class diagramsyour project must implement the

  Card poker game develop a simple poker game complete with

card poker game develop a simple poker game complete with basic ai using the object oriented programming principles

  Program to enter number of values to be processed

Write c++ statements to permit the user to enter n, the number of values to be processed; then assign the anonymous array of n double values, storing its address in doublPtr.

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