fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5.  
  6. int main() {
  7.  
  8. float a;
  9.  
  10. scanf("%f",&a);
  11. if(a>0){
  12. printf("The area of the circle is %.2f",3.14*a*a);}
  13.  
  14. else{
  15. printf("Invalid input");
  16. }
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 5548KB
stdin
Standard input is empty
stdout
The area of the circle is 0.00