hi!
i tried to get the input through keyboard using keyboard.readIn t() method
but after compilation error shows "variable keyboard undefined"
i don't know how to solve the pbm..plzz tell me...and this is my pgm:
import java.io.*;
import keyboard.*;
public class test
{
public static void main(String args[])
{
int number;
int sum;
int num;
System.out.prin tln("Enter the number:");
number=keyboard .readInt();
sum=0;
num=number;
while(num>0)
sum+=num--;
System.out.prin tln("The sum of the first"+number+" integer is"+sum+".");
}
}
i tried to get the input through keyboard using keyboard.readIn t() method
but after compilation error shows "variable keyboard undefined"
i don't know how to solve the pbm..plzz tell me...and this is my pgm:
import java.io.*;
import keyboard.*;
public class test
{
public static void main(String args[])
{
int number;
int sum;
int num;
System.out.prin tln("Enter the number:");
number=keyboard .readInt();
sum=0;
num=number;
while(num>0)
sum+=num--;
System.out.prin tln("The sum of the first"+number+" integer is"+sum+".");
}
}
Comment