Find the sum and difference for numbers

Assignment Help Programming Languages
Reference no: EM13707290

Question 1: Write a program that prompts the user for two numbers, finds the sum and difference for those numbers and displays a descriptive label for each computation by calling two different functions. Use Function Prototypes.

- The 1st function should be called SumLabel and should print out the statement "This is the Sum".

- The 2nd function should be called DifferenceLabel and should print out the statement "This is the Difference".

- The main function should prompt the user for the 2 numbers, call the function to display the correct label, then calculate and display the sum of the numbers.

Call the function to show the correct label, then evaluate and display the difference of the numbers.

I wrote this but it's not working. Can you please help me edit the code so it works or else prepare a new code.

Reference no: EM13707290

Questions Cloud

Write a program that takes cents as an integer and converts : Write a program that takes cents as an integer and converts it to dollars and cents and the conversion should be done in a function called NormalizeMoney.
Evaluate the circumference of a circle : Write a program that will call a function to calculate the area of a circle, and call another function to calculate the circumference of a circle.
Calculate the cube of a number : Write a program that will calculate the cube of a number. Do this by writing a user defined function that returns the cube of the value passed to it. Print out the results from main.
Program that will call a function called writedatatofile : Write a program that will call a function called writeDataToFile to prompt a user for their first name, last name and zip code, and print this information to a file called "UserData.txt".
Find the sum and difference for numbers : Write a program that prompts the user for two numbers, finds the sum and difference for those numbers and displays a descriptive label for each computation by calling two different functions. Use Function Prototypes.
What does the execute bit mean for a directory : What does the 'execute' bit mean for a directory? Show how the execute bit works for referencing files within directories. Does the execute bit need to be set for ANY directory on the path to a file you wish to reference?
Representing an investment value and interest rate : Write a Java test program, all your code should be in the main method that asks the user for two numbers representing an investment value and interest rate.
Prepare a new int[] variable and inititialize it : Prepare a new int[] variable and inititialize it to be a new int array with the given size to create random values use the random class import javautil.random inside the method create a new instance with: Random rand = new Random();
What is a data model and what is it purpose : What is a data model and what is it purpose and what is a prototype and what is its purpose - What is a use case, and what is its purpose?

Reviews

Write a Review

Programming Languages Questions & Answers

  Create a class named rectangle with length and width

To cover that floor with carpet that costs $8 per square foot would cost $960. (12 x 10 x8 = 960.). You should create a class named Rectangle with the following properties:

  Program to create three identical list

Write a program to create three identical list, list1, list2, and list3, of 5000 elements. The program then sorts list1using quick sort, list 2 using insertion sort.

  Write program which models the employee

Write program which models the employee. An employee has an employee number, a name, an address, and a hire date. A name consists of a first name and a last name.

  Write the lisp functions

Write the subsequent LISP functions, add2, add5 and double, if they executed will produce the following results:

  Write an hcs12 assembly sequence to load this element

Calculate the effective address of element myarray on our HCS12 system - write an HCS12 assembly sequence to load this element into the D register.

  Calculate the difference between the number and the average

Write a program that will input an array of 10 REAL4 numbers into an array, and that will calculate the average value of the array and the standard deviation.

  Abstract syntax for interpretation in haskell or prolog

State an abstract syntax of the while language appropriate for interpretation in either Haskell or Prolog. In Haskell, the definition must be the code of a few data types.

  Write down a recursive method to print all the permutations

write a recursive method to print all the permutations of a string. for instance for a string abc the printout is abc

  Develop the application to show coffee customer orders

Develop the application which shows the total pounds of coffee customer orders, sales tax, and total price of order. Write down the name the solution, project, and form file Jason Coffee Solution, Jason Coffee Project.

  Specific changes made for different countries-sites directed

Why were these specific changes made for different countries at whom the sites were directed? Is there anything else you would consider changing.

  Write function to merge contents of two sorted arrays

Write a function which will merge contents of two sorted (ascending order) arrays of type FLOAT values, use efficient bubble sort to sort two arrays first and then use merger function.

  Program to use a stack to represent list of workers

Write a program to simulate this process. Use the following guidelines.- Use a stack to represent the list of workers. Use a queue to represent the list of people waiting to work.

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