Hi, I'm learning how to program and I had to make a code that adds several numbers but when I run it gets stuck after putting the number of numbers to add, someone knows where I'm wrong.
here the code:
import java.util.Scanner;
public class Suma{
public static void main (String [] args) {
Scanner entrada = new Scanner( System.in);
int s = 0;
int suma = 0;
int n=0;
String salida= "";
System.out.println(" Cuanto numeros deseas sumar");
n = entrada.nextInt();
while( s<=n);{
suma = suma+s;
s= s+1;}
System.out.println( salida+ " El resultado es " +suma);
}
}