Calculate area of a circle and of a rectangle

Assignment Help Computer Engineering
Reference no: EM132211478

Question :

Write a program that uses two functions to calculate area of a circle and of a rectangle. Instruction: Declare P1 as a global constant.

Use function prototype on both function.

Interactive input using loops, and the area of circle rounded to two decimal places. Function 1, calculate area of a circle and returns the values.

Example:

double circle(double r)

{

write code to return area of a circle (area is 3.14* radius squared)

} Function 2,

calculate area of a rectangle and displays the values.

Example:

void rectangle(int length, int width)

{

write code to displays area of rectangle (area is length * width)

}

Reference no: EM132211478

Questions Cloud

WAP that takes integer as number of both rows and columns : Write a program ShiftNumbers.java that takes integer M as the number of both rows and columns for your 2D array. Create the same exact following 2D array.
Write a program to simulate managing les on disk : Write a program to simulate managing les on disk. De ne the disk as a onedimensional array disk of size numOfSectors*sizeOfSector, where sizeOfSector indicates.
Write a program to read the salary for ten employees : Write a program to read the Salary for 10 employees. Calculate average of Salary. Calculate the Max Salary and Min Salary.
Discuss ethics in research : Discuss Ethics in Research - you need to be concerned about protection for those participants. As seen in 45 CFR 46 in the Code of Federal Regulations
Calculate area of a circle and of a rectangle : Write a program that uses two functions to calculate area of a circle and of a rectangle. Instruction: Declare P1 as a global constant.
Compute the width of each column based upon the precision : Compute the width of each column based upon the precision. All columns after the rst should have the same width. All columns should be separated by a blank.
Write a program that takes a shift value and a plaintext : Write a program that takes a shift value between +/- 26 and a plaintext message (no spaces) and returns the corresponding ciphertext.
Write a program that will simulate scheduling algorithms : Write a program that will simulate non - preemptive process scheduling algorithms in C++: FCFS(First Come First Serve).
Write a program that takes a single number from the user : Write a program that takes a single number from the user and returns the number multiplied by the number+7.

Reviews

Write a Review

Computer Engineering Questions & Answers

  List key characteristics of basic version of microcontroller

From the data book of a microcontroller you have access to, list the key characteristics (Registers, Memory architecture, Instruction set, I/O interfaces).

  Write pseudocode for program that prompts the user for month

Write pseudocode for a program that prompts the user for a month and day and prints out whether it is one of the following four holidays: • New Year's Day (Jan

  Write a program that gives simple math quizzes

Write a program that gives simple math quizzes. The program should display two random numbers that are to be added.

  Create a game of rock and a series of if statements

Create a game of Rock, Paper, Scissors using random import, a while loop, and a series of if statements.

  Assess the likelihood of occurrence for each given risk

Assess the likelihood of occurrence for each risk. Assess the impact of each risk on the success of the project. Identify an owner for each risk. Recommend a strategy to manage each risk.

  Write two algorithms for the selmer scheme

Write two algorithms for the RSA scheme. Write two algorithms for the Selmer scheme: one for the signing process and one for the verifying process.

  What is the fourth number to be printed out

How mzany numbers will be printed out after executing the above algorithm? How many subscripts does a three dimensional array require?

  Give the formula for finding the probability

Suppose there are 150 users sharing a communication link. Suppose each user transmits data only 12% of the time.

  Show how to find out such a seating arrangement

Show how to find out such a seating arrangement and prove that no such seating plan is possible.

  What are the reasons of project failure

Make sure to contain how and why project was initiated, what setting up was done, how plan went wrong and what was done to solve the trouble. What are the reasons of project failure

  Create a second class to test your park class

Create a Park class. Include data members such as name of park, location, type of facility. Create a second class to test your Park class.

  How many bytes does this string take in the memory

If a string is stored at the memory address 0 times 20008000 and the string is "Cortex-M", show the memory content in hex format starting at 0 times 20008000.

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