float radius;
String msg = "What is the radius of your circle?";
float area;
String msg2 = "Your circle has an area of: ";
float pi = 3.14;
int dur = 500;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
Serial.println(msg);
while(Serial.available() == 0){
}
radius = Serial.parseFloat();
area = pi * radius;
Serial.println(msg2 + area);
delay(500);
}