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

  Determines the aproximate number

Show how this can be done in a loop so the user can see resuts in a table. Let the output display and have headings for Day and Number of Bacteria Present on that day?

  Write recursive function to return maximum element of array

Write down the recursive function which receives three parameters: The recursive function must return maximum element of array.

  Use a two dimensional array to solve problem

Use a two dimensional array to solve the following problem. A company has four salespeople ( 1 to 4) who sell five different products ( 1 to 5).

  Explain different kind of product sold

Use two-dimensional array to solve following problem. Company has four salespeople(1 to 4) who sell five different products (1 to 5). Once day, each salesperson passes slip for each different kind of product sold.

  Creating personnel promotion application program

The following application program will be modified to accommodate the change to the database table. The personnel promotion application program.

  Use for loop to calculate sum of squares of numbers

Given int variables k and total which have already been declared, use the for loop to calculate sum of squares of first 50 counting numbers, and store this value in total.

  Determine if a word is a palindrome

Determine if a word is a palindrome. Using a doubly link list read in a word character by character Store each character in its own node. Keep a counter of the number of characters that make up the word.

  Write shell script to read from keyboard-display on monitor

Write shell script called poject.21 to read from keyboard and display on monitor first name, last name and age if the age is less than 50.

  Write iterative program which finds largest number

Write the iterative program which finds largest number of McNuggets which cannot be bought in exact quantity. Your program must print the answer in the following format.

  Program to find if number input by user is palindrome or not

Write down the program which uses the method called palindrome ( ) to find out if number input by user is a palindrome or not. For instance 1221 is palindrome as it can be read same way forwards and backwards.

  Case study the realcobreadmaster1develop a master

case study the realcobreadmaster1.develop a master production schedule for the breadmaker. what do the projected ending

  Create program which asks for number of fat grams

Create a program which asks for number of fat grams and calories in a food item. Validate input as follows: Make sure number of fat grams and calories are not less than 0.

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