I did the division summation and multiplication and subtraction functions :
Then I also added text for the result .
But I really got problem with using them into textfields .
Following are screenshot for my sketch:
PFont fontA ;
PImage a ;
int divisionof2numbers ( int number1 , int number2 ) {
int division = 0;
division = number1 / number2 ;
println ("the answer of division :" + number1 + " divide " + number2 + " = " + division );
return division ;
}
void setup()
{
a = loadImage ( "bg.png");
size (400,400) ;
background(a);
int answer = divisionof2numbers ( 4444444 , 44 ) ;
fontA = loadFont("Amoeba-Bold-48.vlw");
textFont(fontA, 32) ;
fill(0, 102, 153);
String s = "The answer is :" + answer ;
text ( s,50 , 200);
}