Module: (Java) Subrutinas: procedimientos y funciones - 1


Problem

5/11

Dos opciones

Problem

Escriba un procedimiento que tome dos parámetros – el número natural N, y la cadena S – e imprime la cadena S en la pantalla, repitiéndola N veces.

Ejemplos
# Entrada Salida
1 3
bien
okokok
Write the program below
import java.util.Scanner;
public class Main { 

// напишите процедуру ниже     
public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n;
        String s;
        n = Integer.parseInt(in.nextLine());
        s = in.nextLine();
        printLine(n, s);
     }
} 
  

     

Program check result

To check the solution of the problem, you need to register or log in!