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

  Generate a set of 75 random integers in the range -26 to + 4

Write a program that will generate a set of 75 random integers in the range -26 to + 42. The program

  Program that reads in the average monthly

Write a program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months. The program then prints out a nicely formatted table showing the rainfa..

  Generate an object-oriented design for a system

Generate an object-oriented design for a system that keeps tracks of your CD and DVD collection. Identify each of the classes, associated data, and operations for the classes.

  Displays all the numbers

write a java program that displays all the numbers from 100 to 200, ten per line, that are divisible by 5 and 6 .

  How will you declare a float string char bool and decimal

How will you declare a float, string, char, bool, and decimal? Assign values to these data types as 1278.977, C#, c, and true

  What are reasons for using generics

Explain generics in C#. What are reasons for using generics? How do generics apply to collections? Write the code for a small example using C# code

  Example of a program that contains an algorithm

Provide an example of a program that contains an algorithm whose Big-Θ is exponential. Clearly explain what n represents in your program. Make some assumption about how long it would take to execute one of the operations that you are counting.

  Design, implement, test, and debug a simple visual basic

Design, implement, test, and debug a simple Visual Basic® program. Requirements The GUI program will have a button that creates a new window with the word Hello. Enhance the display by making the word change color, move, or change to another lang..

  Program user to enter student names and final grades

Write a program that would allow a user to enter student names and Final grades (e.g. A,B,C,D,F) from their courses. You do not know how many students need to be entered. You also do not know how many courses each of the students completed.

  Difference between the effects of the given two declarations

What is the difference between the effects of the following two declarations: Ratio y(x); Ratio y = x; What is the difference between the effects of the following two lines: Ratio y = x; Ratio y; y = x;

  Calculate the commission owing for that record

Construct an algorithm that will read a record on the file, calculate the commission owing for that record, and print the retail price, commission and employee number

  How can we definean instance of this class

How can we definean instance of this class?

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