Print a line P99541


Statement
 

pdf   zip   main.cc   main.c

thehtml

Write a procedure

void print(int s, char c, int n);

to print a line with s spaces followed by n characters c. For instance, these three calls

print(0, 'X', 3); print(1, 'y', 4); print(2, 'A', 2);

produce this output:

XXX
 yyyy
  AA

Observation You only need to submit the required procedure; your main program will be ignored.

Information
Author
Salvador Roura
Language
English
Translator
Salvador Roura
Original language
Catalan
Other languages
Catalan
Official solutions
C C++
User solutions
C C++