Program to gets an integer from the user and returns it

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

Using C visual express write a function that:

// gets an integer from the user and returns it
// make 3 calls to this function:
// 1.. To get the radius of the circle from the user and return it to main
// 2.. To get the length of the rectangle from the user and return it to main
// 3.. To get the width of the rectangle from the user and return it to main
(Hint: you can prompt from the main function BEFORE you call your function. You do NOT need to prompt from inside this function)
int GetInt(void);

// takes one arguments, the length of the square returns the area
int CalculateAreaRec(int length, int width);

// takes one argument, the radius of the circle and returns the area
double CalculateAreaCir(int radius);

Reference no: EM13938881

Questions Cloud

Role of innovation for sustainable development : A company's ‘sustainability agenda' can be an effective contributor to its overall appeal and value proposition...Discuss this statement in the context of the company for which you did your major assignment OR for Ripcurl.
How does this relate to the innervation of the colon : Mr. Frank, a former stroke victim who had made a remarkable recovery, suddenly began to have problems reading. He complained of seeing double and also had problems navigating steps. He was unable to move his left eye downward and laterally. What c..
Compute the dividend payout ratio : Presented below are selected data from the financial statements of Debonair Corp. for 2009 and 2008. Calculate the dividend payout ratio for 2009.
The stock market : On October 19, 1987, the stock market (as measured by the Dow Jones Industrial Average) lost almost one-quarter of its value in a single day. Nevertheless, some traders made a profit buying call options on the stock index and then liquidating their p..
Program to gets an integer from the user and returns it : get the radius of the circle from the user and return it to main
Potential of expanding into a chain of coffee shops : Since, there are a limited number of coffee shops in that area, that is why the location is perfect to attract people and with a well-structured company model, the business will have the potential of expanding into a chain of coffee shops at diffe..
Discuss the importance of capacity planning in deciding : Discuss the importance of capacity planning in deciding on the number of police officers or fire trucks to have on duty at a given time.
Forecast horizon of five years : Using the residual income model, prepare a valuation of the common stock of Welmark Corporation as of Year 3 under the following assumptions: a. Forecast horizon of five years. b. Sales growth of 10.65% per year over the forecast horizon and 3.5% t..
Final stage of the marketing audit : The final stage of the marketing audit is for you to evaluate how well the marketing mix of the organisation is performing for your chosen organisation.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Display the commands

Display the commands(s) used to do the following (and show the results): see the df command to view file system use in megabytes.

  Write two short c programs and solve exam-style problem

Write two short C programs and solve four exam-style problems.

  Write function that is passe an array of n pointers to float

Write a function that is passed an array of n pointers to floats and returns a newly created array that contains those n float values. Implement a function for integrating a function by means of Riemann sums.

  Design a modularized body mass index program

Design a modularized Body Mass Index (BMI) Program which will calculate the BMI of a team player. The formula to calculate the BMI is as follows:  BMI = Weight * 703/Height2

  Design class for textbook-data field for grade level of book

Design a class named TextBook that is child class of Book. Include new data field for grade level of book. Create a displayTextBookInfo () method so that you can accommodate new grade-level field.

  Find and print the largest number in the array

Write a C program that declares an (integer) array of size 10, prompts the user to enter 10 integers and stores them in the array. The program should then

  Create a function that will accept a scalar value

Create a function that will accept a scalar value for the radius of the cylinder and end caps and will accept an array for the height of the cylinder.

  Design an application for the homestead furniture

Design an application for the Homestead Furniture Store that gets sales transaction data, including an account number, customer name, and purchase price. Output the account number and name, then output the customer's payment for each month for the ne..

  Main function to input twenty integers in given range

Write a main function to input 20 integers in range of 1-6, function should count number of times the numbers 2 and 5 occur. function must declare statics variables count2 and count5.

  Program that will calculate the heat transfer of a substance

write a program that will calculate the heat transfer of a substance (water) given three different shapes. The user has to be able to input the type of shape, so that the computer can calculate area, and plug it back in to the equation for heat trans..

  Write a method named negative sum

Write a method named negativeSum that accepts a Scanner as a parameter reading input from a file containing a series of integers, and determine whether the sum starting from the first number is ever negative

  Performance of disk memory system

Suppose a regional computer centre A wants to evaluate the performance of its disk memory system. One measure of performance is the average time between failures of its disk drive. To estimate this value, the centre recorded the time between failu..

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