Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that is able to compute circumferences of circles, given the rad

ID: 673371 • Letter: W

Question

Write a program that is able to compute circumferences of circles, given the radius of the circle.

Use three macros:

one that defines Pi

another one that computes the circumference, i.e. a macro that resembles a function

the number of RUNS, see below

Have the user input a radius, upon which the circumference is computed. Use a for-loop in order to go through a number of configurable RUNS, which will also be defined in a macro, i.e. called RUNS. For your submission, set RUNS to 5.

Steps to follow

Identify and document the input(s) and the output(s)

Describe the algorithm that solves the problem

Write the C program that solves the problem

What to submit

Submit two files through BBLearn:

One word document that contains your take on steps #s 1&2

A .c file that contains your C program developed in step #3

Explanation / Answer

class CircleDemo2 { public static void main(String args[]) { int radius = 3; double circumference= Math.PI * 2*radius; System.out.println( "The circumference of the circle is:"+circumference) ; } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote