Post Reply 
real math print: printf Xcas cmd 3/4 → ¾
02-13-2019, 03:16 PM (This post was last modified: 02-22-2019 02:23 AM by compsystems.)
Post: #1
real math print: printf Xcas cmd 3/4 → ¾
Hello
Xcas has a function to print in prettyprint (2D) very important to show equations and results as in textbooks, please hpprime develop group incorporate this function

PHP Code:
function area_of_the_triangle()
begin 

                local Base
HeightAnswer;

                
assume(Base,float);

                
assume(Height,float);

                
assume(Answer,float);


                
DispGClrGraphClrIO;


                
printf"Please enter the base of the triangle" );

                
inputBase );


                
printf"Please enter the height of the triangle" );

                
inputHeight );


                
Answer := * (Base Height);

                
printf"The area of the triangle is %gen "Answer )
                print( 
"The area of the triangle is "Answer )

                
printfx^);  // x²
                
print( x^); // x^2

                
return Done;

ffunction

area_of_the_triangle() [enter] then 1/2 then 3 returns in pretty print
"The area of the triangle is ¾"

with print cmd ( print lineary) returns

"The area of the triangle is 3/4"


[enter]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
real math print: printf Xcas cmd 3/4 → ¾ - compsystems - 02-13-2019 03:16 PM
RE: printf cmd 3/4 → ¾ - compsystems - 02-14-2019, 12:42 AM



User(s) browsing this thread: 1 Guest(s)