hello guys, i am facing the problem, it is a very simple one, but the solution is not striking right now, the following is the code that i have typed, but there is a problem in scanning the value of character variable 'chy', the compiler is not stopping to accept the value.
the scanf line which is bold and in italics is the one with the problem, i think so. following is the code.
-------------------------------------------------------------------------------------------------------
#include<stdio.h>

#include<math.h>
int main()
{
double pie,theth,dis,velo=0.0;

char chy;
char ty;
do
{

printf("\nEnter the angle theta: ");
scanf("%lg",&theth);

printf("\n Enter the angle pie: ");
scanf("%lg",&pie);

printf("\nEnter the velocity of the projectile: ");
scanf("%lg",&velo);

pie=3.1415927/180.0*pie;
theth=3.1415927/180.0*theth;

dis=2.0*velo*velo*cos(theth)*cos(theth)*(tan(theth)-tan(pie)/(9.81 * cos(pie)));

printf("\nThe Distance is: %g",dis);

printf("\nDo You whish for another calculations [Y|N]: ");
scanf("%c", &chy);

printf("\nthe valu of n and N is: %c, %c",chy,ty);
}while((chy != 144) || (chy != 78));

return 0;
}

-----------------------------------------------------------------------------------------------------------
please let me know about the problem.
thank you for your time and patience.
Regards
Harbir