Help me in solving VADD5 problem

My issue

My code

#include <stdio.h>

int main() {
  double pi = 3.14 ;
  double radius = 8.9 ;      //radius has to be declared as a 'double'
  double area = pi * radius * radius;
  printf("The Area of the given Circle is %", area ); 
  return 0;
}

Learning course: Learn C
Problem Link: CodeChef: Practical coding for everyone

your code is all right I guess but the only problem is in your last statement i.e.
printf(“The Area of the given Circle is %”, area );
after the percentage sign you should use lf as you are printing a double type of variable.
CORRECT STATEMENT SHOULD BE :
printf(“The Area of the given Circle is %lf”, area );

hope this helps !!

1 Like