Oct 19, 2013 #1 N naya2013 Newbie level 2 Joined Oct 19, 2013 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 62 answer of tan(pi/2) how can display using mikroc?when i tried.but (pi) undeclared e identifier 'pi' in expression.help me......?
answer of tan(pi/2) how can display using mikroc?when i tried.but (pi) undeclared e identifier 'pi' in expression.help me......?
Oct 19, 2013 #2 jayanth.devarayanadurga Banned Joined Dec 4, 2012 Messages 4,280 Helped 822 Reputation 1,654 Reaction score 791 Trophy points 1,393 Location Bangalore, India Activity points 0 Code C - [expand]1 2 3 4 5 6 7 8 9 void main(){ const Pi = 3.14159265; double tanVal = 0.0; tanVal = tan(pi / 2.0); while(1); }
Code C - [expand]1 2 3 4 5 6 7 8 9 void main(){ const Pi = 3.14159265; double tanVal = 0.0; tanVal = tan(pi / 2.0); while(1); }
Oct 19, 2013 #3 N naya2013 Newbie level 2 Joined Oct 19, 2013 Messages 2 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 62 jayanth.devarayanadurga said: Code C - [expand]1 2 3 4 5 6 7 8 9 void main(){ const Pi = 3.14159265; double tanVal = 0.0; tanVal = tan(pi / 2.0); while(1); } Click to expand... there is a problem.we know tan(pi/2.0)=0.02742243 but how can we display it using lcd?
jayanth.devarayanadurga said: Code C - [expand]1 2 3 4 5 6 7 8 9 void main(){ const Pi = 3.14159265; double tanVal = 0.0; tanVal = tan(pi / 2.0); while(1); } Click to expand... there is a problem.we know tan(pi/2.0)=0.02742243 but how can we display it using lcd?
Oct 20, 2013 #4 jayanth.devarayanadurga Banned Joined Dec 4, 2012 Messages 4,280 Helped 822 Reputation 1,654 Reaction score 791 Trophy points 1,393 Location Bangalore, India Activity points 0 Code C - [expand]1 2 3 4 5 6 7 8 9 10 11 12 unsigned char sTanVal[23] = ""; void main(){ const Pi = 3.14159265; double tanVal = 0.0; tanVal = tan(pi / 2.0); FloatToStr(tanVal, sTanVal); Lcd_Out(1,1,sTanVal); while(1); }
Code C - [expand]1 2 3 4 5 6 7 8 9 10 11 12 unsigned char sTanVal[23] = ""; void main(){ const Pi = 3.14159265; double tanVal = 0.0; tanVal = tan(pi / 2.0); FloatToStr(tanVal, sTanVal); Lcd_Out(1,1,sTanVal); while(1); }