Print X N numbers of times

Beginner Problems Language Basics Easy

Given two integers X and N, print the value X on the screen N times. Move to the next line after printing, even if N = 0.

Examples:

Input: X = 7, N = 5

Output: 7 7 7 7 7

Input: X = 15, N = 1

Output: 15

Input: X = -5, N = 4

Constraints

  • -100 <= X <= 100
  • 0 <= N <= 100

Company Tags

TCS Cognizant Accenture Infosys Capgemini Wipro IBM HCL Tech Mahindra MindTree