answersLogoWhite

0

I'm not sure how you'd do this in C++, but I could have a go at it in php since that's what I know.

You know that Pi is approximately 22/7, in php you can use the pi function.

You'd need your input(radius) to come from a form if it was web-based, which is simple enough.

perimeter = 2nr = 2 x (22/7) x r

function getPerimeter ($input) {

$input = $_GET['formInput'];

$pi=pi();

$perimeter = (2*$pi)*$input;

return $perimeter;

}

HTH

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What are ChatGPT prompts?

ChatGPT prompts are carefully crafted inputs or questions that guide the AI in generating meaningful, coherent, and relevant outputs. These prompts can be used for various tasks like writing, brainstorming, planning, and even personal development. For more details, you can visit our website:- Prinik Academy


Turbo c program that prompts user to try again?

puts ("Try again");


How do you write a function isVowel that returns the value true if given a vowel and otherwise returns false and prompts user to enter a sequence of characters and outputs the number of vowels?

bool isVowel(char c){if ((c 'u'))return true;elsereturn false ;}


How do you open C when it prompts you to choose the program to open it with with in a list?

edit your autorun.inf file, add the line open=C:\windows\explorer.exe good luck Kevin


How do you rip a CD to your computer?

You need a program that will do the ripping - the latest version of Windows Media Player does it. After that, select "Rip" or "Copy from CD" or something like that and folow the prompts.


How do I install engineering software to my computer?

To install engineering, or any other software to your computer, you first need to put the disc it comes on into the disc drive. Then, you should run the installer on the disc and follow the prompts onscreen. If it is a program that you've downloaded, start the .exe file that you downloaded and follow the prompts that it gives you.


What are some prompts for kids poems?

There are many sources of prompts for kids poems on the internet. Poetry4Kids and Scholastic both publish numerous prompts for kids poems on their websites.


Does vibe navigation unit have voice prompts?

yes is does have voice prompts. you have to increase the volume in the setup?


Do you have to stick to essay prompts?

no


How reset Toyota Sienna theft deterrent?

You need a computer program that can type command prompts to ECU. Look on Craig's for an auto locksmith under services that can program chipped keys and has ability to reset PATS and is mobile. It will cost about 100 and takes 5-10 mins.


Word that begins with the prefix mis and means prompts a kiss?

It doesn't MEAN "prompts a kiss," it DOES prompt a kiss, and it is mistletoe.


What prompts John Thornton and his partners to travel east and leave Dawson?

gold prompts john thorton to leave dawson