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
I did a little dummy-proofing and added a loop so you can redo it as many times as you need to
var radius : string
var circumference : real
var radius_value : real
var retry : string
loop
loop
%getting the radius
put "Please give the radius of the circle"
get radius
%checking if the given radius will be ok
if strrealok (radius) then
exit
else
delay (500)
put "Please put a valid radius"
end if
end loop
%converting radius string to radius real
radius_value := strreal (radius)
%calculating circumference
circumference := radius_value*2*3.14
%outputting final results
delay (500)
put "The circumference of your circle is ",circumference, "(unit of measurement)"
delay (500)
put "Do you wish to calculate another answer? (y or n)"
get retry
if retry = "n" then
exit
end if
end loop
puts ("Try again");
edit your autorun.inf file, add the line open=C:\windows\explorer.exe good luck Kevin
Sure! Here's a simple Python program that allows the user to input 5 numbers and then calculates and prints their total: numbers = [] for i in range(5): num = int(input("Enter a number: ")) numbers.append(num) total = sum(numbers) print("The total is:", total) This program prompts the user to enter a number 5 times, converts each input to an integer, stores them in a list, calculates the sum of the numbers using the sum() function, and finally prints the total.
write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit
Any type will do, here is an example: for (leave= 0, nnum= 0; ! leave; ) { rc= scanf ("%d", &number); if (rc!=1 number==-1) { leave=1; continue; } ++nnum; ... do something with number ... }
puts ("Try again");
bool isVowel(char c){if ((c 'u'))return true;elsereturn false ;}
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.
edit your autorun.inf file, add the line open=C:\windows\explorer.exe good luck Kevin
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.
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.
yes is does have voice prompts. you have to increase the volume in the setup?
no
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.
It doesn't MEAN "prompts a kiss," it DOES prompt a kiss, and it is mistletoe.
gold prompts john thorton to leave dawson
UTOT !!