Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- * @author Hantack
- */
- public class SumaNumeros {
- public static void main(String[] args) {
- int res = 0;
- int cont=1;
- while(cont <= 100){
- res += cont;
- cont++;
- }
- System.out.println("La suma del 1-100 es: "+res);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement