my problem remains unsolved.when i try with import java.Text.*; the compiler
says:expo.java [2:1] Package java.Text. not found in import.
import java.Text.*;
and when i try with import org.w3c.dom.Text; it says:
expo.java [11:1] Cannot use operator new for this type
Text cin=new Text();
^
expo.java [11:1] Cannot parse initializer
Text cin=new Text();
^
expo.java [13:1] No method found matching readDouble()
x=cin.readDouble();
here is my program:
import java.io.*;
import Text;
class expo
{
public static void main(String args[]) throws IOException
{
double factor,us,expo,x;
factor=1;
us=1;
expo=1;
Text cin=new Text();
System.out.println("please enter a number");
x=cin.readDouble();
for(double sayi=1;sayi<=200;sayi++)
{ factor*=sayi;
us*=x;
expo+=us/factor;
}
System.out.println("the exponent of your number is="+expo);
}
}