Hi there!
I am studying at the university and I'm set to solve a program in C. Unfortunately, it doesn't work and neither my groupmates nor my teacher know why it doesn't work.
I would be very grateful if you give me some advice on correcting my code. Thank you in advance!
This is the task: s=(a2-p)/(b*log2(b+p)) if 2.5<=p<a and s=3.51*p1/2/(a-1).
#include <stdio.h>
#include <math.h>
#define a 3.651
#define b 5.82
main ( )
{
float p,s;
printf("Input p=");
scanf("f",&p);
if ((p>=2.5) && (p<a))
{
s=(a*a-p)/(b*(log(b+p)/log(a)));
printf("\ns=%f p=%f", s, p);
}
else
if ((p>4) && (p<=b))
{
s=(3.51*sqrt(p))/(a-1);
printf("\ns=%f p=%f", s, p);
}
}