You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
xpetit 32eddefd09
Remove template variable [[ROOT]] from subjects and fix subjects
4 years ago
..
README.md Remove template variable [[ROOT]] from subjects and fix subjects 4 years ago

README.md

repeatalpha

Instructions

Write a program called repeat_alpha that takes a string and displays it repeating each alphabetical character as many times as its alphabetical index.

The result must be followed by a newline ('\n').

'a' becomes 'a', 'b' becomes 'bb', 'e' becomes 'eeeee', etc...

If the number of arguments is different from 1, the program displays nothing.

Usage

student@ubuntu:~/repeatalpha$ go build
student@ubuntu:~/repeatalpha$ ./repeatalpha abc | cat -e
abbccc
student@ubuntu:~/repeatalpha$ ./repeatalpha Choumi. | cat -e
CCChhhhhhhhooooooooooooooouuuuuuuuuuuuuuuuuuuuummmmmmmmmmmmmiiiiiiiii.$
student@ubuntu:~/repeatalpha$ ./repeatalpha "abacadaba 01!" | cat -e
abbacccaddddabba 01!$
student@ubuntu:~/repeatalpha$ ./repeatalpha
student@ubuntu:~/repeatalpha$ ./repeatalpha "" | cat -e
$
student@ubuntu:~/repeatalpha$