Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to display answer of tan(PI/2) using mikroc?

Status
Not open for further replies.

naya2013

Newbie level 2
Newbie level 2
Joined
Oct 19, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
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......?
 


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);
}


there is a problem.we know tan(pi/2.0)=0.02742243
but how can we display it using lcd?
 


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);
}

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top