dunce --> stupid
See if this function works :
public void calculatePrime(int number){
for( int i = 2; i < number i++){
if((number % i) == 0){
System.out.println("The number you entered is not a prime");
return;
}
}
System.out.println("The number you entered is prime");
}
Okay I'll try to find some for ya.
annoying site --> dumb head
now that I have downloaded the client ... the applet starts working fine lol :D
You know Dani ! I had to download the whole mirc client only bcuz the chat applet on daniweb was not working ... the error it displayed was : couldnot find the specified applet.
owww ! I misunderstood you ... okay let me try n then I'll post the solution for you
pie --> chart
have you tried the boot time scan ?? some viruses wont go away when the windows has loaded.
you should be installing the driver of your vga card not the monitor ...
to make it display some where but not in the way
what does this mean ????
where do you want it to be displayed ??
if I were coding ... I would have put it in the startup and check for date and time ( Calendar class) everysecond or so ... and then set it visible on the specified time.
thats a great achievment ... congrats Dani and all daniweb geeks
I use myIE2 ... its like IE with a lot more options. I have tried firefox it runs very heavy on my pc .. and I've tried IE ... it has al lot of problems with its downloading and browsing capabilities.
latin --> American
okay I give you a raw idea about your program ... if still you cant understand ... post again...
input n1 from keyboard
check if its square is greater than nbr
if yes put flag1 = n1
if no put flag1 = 0input n2 from keyboard
check if its square is greater than nbr
if yes put flag2 = n2
if no put flag2 = 0input n3 from keyboard
check if its square is greater than nbr
if yes put flag3 = n3
if no put flag3 = 0compare flag1, flag2 and flag3 for the highest number
eliminate the highest
compare the other two left for the highest number
eliminate the highestthe last number left is what should be printed.
import javax.swing.JOptionPane; // program uses JOptionPane
public class EvenOdd {
/** Creates a new instance of EvenOdd */
public EvenOdd() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String Number; // string entered by user
String result; // a string containing the output
int number; // number to be read
int even; // number if even
int odd; // number if odd
// read number from user as a string
Number = JOptionPane.showInputDialog( null, " Enter a number" );
// convert number from type String to type int
number = Integer.parseInt( Number );
// initialize result to empty String
result = "";
if ( number%2 == 0/2 );
result = result + Number + " is EVEN ";
// Display results
JOptionPane.showMessageDialog( null, result, " Results ", JOptionPane.INFORMATION_MESSAGE );
System.exit ( 0 ); // terminate application
if ( number%2 != 0/2 ){
result = result + Number + " is ODD ";
}
// Display results
JOptionPane.showMessageDialog( null, result, " Results ", JOptionPane.INFORMATION_MESSAGE );
System.exit ( 0 ); // terminate application
} // end method main
} // end class EvenOdd
I dont understand your question ... why dont you want to print 12 and you want to print 11 ??? both are greater than 100.
what is the file system on the d drive ... and what operating system are you using...?
It is not only the registry that matters ... some programs do have some changes in the system files .... you can use system mechanic to track changes in the registry and your hard drive ...
what exactly are you trying to do ... you can use simple if statements to check whether nbr is greater than zero or not.
haha ! --> *cheers*
If you want to do anything else .. what are you planning to do ... and what exactly are the errors you are getting.??
import javax.swing.JOptionPane;
public class FirstProgram2
{
public static void main (String[] args)
{
String school = JOptionPane.showInputDialog("Enter your school name");
String first = JOptionPane.showInputDialog("Enter first decimal number") ;
String second = JOptionPane.showInputDialog("Enter second decimal number") ;
System.out.println("Your school's name is " + school) ;
System.out.println("first number you entered is " + first);
System.out.println("second number you entered is " + second);
}
}
run to the hills --> no where to run
So he made
ragnarok --> twlight of gods
the demon did'nt
I came to know today that paypal does not work in Pakistan when I was trying to have a paid subscription for daniweb ... should I be able to pay via credit card ???
how can I edit my right click menu in windows 2000?? it has become very heavily occupied and it takes time to open ...
I recommend you using system mechanic and tuneup utilities for system maintaince.
mustaine --> all hands down ( I didnt find this word in the dictionary .. would you please tell me what does it mean).
threads are lightweight processes(consuming much less resources than the heavyweight processes) which are created by some process.
of the carton
just block everyone and you'll always be offline :D
I have got a philips monitor --- lets make things better:mrgreen: :mrgreen: :mrgreen: :o
which language do you want to use ??
do you mean threads and processes ???
wild --> headless
can you please indent your code properly .. its unreadable..
yes we are a community ... we are like brothers and sisters ... we help eachother ... a warm welcome for you on entering this family:)
[img]http://www.stargate-sg1.com/home/episodes/images/fullsize_s5/RedSky_2.jpg[/img]
next : goofy man
papatoetoe --> goofed children
slowly and steadily daniweb is on a rise !!! hope to get a 100 million soon:)
I vote for philips --- lets make usa better:d
have you written a simple program in java ??? if yes ... then public static void main (String [] args) is a function ... in java a function is called a method ... you can write a method like this :
public void methodName(in a, double b){
}
where void is the return type and a and b are the passing parameters.
Wah ! I have a gmail account too ... now how will I get the links .. and what should I be doing to send them over here?
You could use a database and sql to query all that you want.
and suddenly a
grease --> cheese