The idea is to write a program that asks a user for 10 numbers and then displays how many positive and negative numbers were entered. Not really sure where I'm going wrong but this was an extra assignment to kill time while everyone else catches up.
this is what I have so far.
/*Practica1 12 - Question 1
Program to ask a user to enter 10 numbers and display how many are positive and how many are negative
15/4/15*/
import java.util.*;
public class Positve_Negative
{
public static void main(String args[])
{
Scanner keyboardIn = new Scanner(System.in);
int Number;
int Positive = 0;
int Negative = 0;
int loop_start = 0;
int loop_end = 10;
for (loop_start < loop_end)
{
System.out.print ("Enter a number");
Number = keyboardIn.nextInt();
if ( Number >=0)
{
Positive ++;
}
else if ( Number <0)
{
Negative ++;
}
loop_start ++;
else
{
System.out.print ("Positive numbers were " + Positive + "& negative numbers were " + Negative);
}
}
}
}