Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to HELP!!(I need to make int to work as an "if" or "else")
How to HELP!! [message #1040875] Sun, 14 April 2013 04:18 Go to next message
Kyle Hericks is currently offline Kyle Hericks
Messages: 1
Registered: April 2013
Junior Member
import java.util.Scanner;
public class search{
public static void main(String[] args){

Scanner search = new Scanner(System.in);
double int fnumber, snumber, answer;
String answer2;
answer2 = ("That is correct.");
System.out.println("Enter first number here: ");
fnumber = (int) search.nextDouble ();
System.out.println("Enter second number here: ");
snumber = (int) search.nextDouble();
answer = fnumber + snumber;
System.out.println(answer2);

}
}
Re: How to HELP!! [message #1041799 is a reply to message #1040875] Mon, 15 April 2013 11:42 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25942
Registered: July 2009
Senior Member
There's not even a question mark in your post.

http://www.catb.org/esr/faqs/smart-questions.html#intro

On 15/04/2013 5:34 PM, Kyle Hericks wrote:
> import java.util.Scanner;
> public class search{
> public static void main(String[] args){
>
> Scanner search = new Scanner(System.in);
> double int fnumber, snumber, answer;
> String answer2;
> answer2 = ("That is correct.");
> System.out.println("Enter first number here: ");
> fnumber = (int) search.nextDouble ();
> System.out.println("Enter second number here: ");
> snumber = (int) search.nextDouble();
> answer = fnumber + snumber;
> System.out.println(answer2);
>
> }
> }
>
Previous Topic:Russian Letters Are Not Being Recongnized
Next Topic:installation problem
Goto Forum:
  


Current Time: Tue Jul 29 19:13:21 EDT 2014

Powered by FUDForum. Page generated in 0.02024 seconds