Module: 子程序:过程和函数 - 1


Problem

5/11

两种选择

Problem

编写一个程序,需要两个 –一个自然数 N 和一个字符串 S –并通过重复 N 次来显示字符串 S

示例。
<正文>
输入 输出
3 奥科科克
1
using System;   
2
class Program {   
3
    static void printString(int N, string s) {   
4
5
6
7
8
    static void Main() {   
9
        int N = Convert.ToInt32(Console.ReadLine());   
10
        string s = Console.ReadLine();   
11
        printString(N, s);   
12
    }   
13
}   

     

Program check result

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