fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #define PI 3.141593
  4. int main(void) {
  5. float v0, a, x, x0,v;
  6. printf("Enter v0, a, x, x0 : ");
  7. scanf("%f %f %f %f",&v0,&a,&x,&x0);
  8. v=sqrt(pow(v0,2)+2*a*(x-x0);
  9. printf("\nThe velocity is %.3f",v);
  10. return 0;
  11. }
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:8:32: error: expected ‘)’ before ‘;’ token
     v=sqrt(pow(v0,2)+2*a*(x-x0);
                                ^
prog.c:11:1: error: expected ‘;’ before ‘}’ token
 }
 ^
prog.c:5:24: warning: variable ‘v’ set but not used [-Wunused-but-set-variable]
     float v0, a, x, x0,v;
                        ^
stdout
Standard output is empty