Cómo escribir un programa Java para imprimir números del 1 al 500 en lenguaje de programación C ?
Este programa Java para imprimir números del 1 al 500 en el lenguaje de programación C .
Solution:
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- // 1.-Imprimir los numeros del 1 al 500
- int contador;
- contador=1;
- while (contador<=500){
- System.out.println(contador);
- contador=contador+1;
- }
- }
- }
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.