import java.io.*;

class problm_24 {

public static void main(String args[])throws IOException

{

float suma;

BufferedReader tecla=new BufferedReader (new InputStreamReader(System.in));



System.out.print("Ingrese numero:");

int n = Integer.parseInt(tecla.readLine( ));



System.out.println("suma=" +(n*(n+1)/2));



}

}

0 comentarios:

Publicar un comentario en la entrada