
Write a program that draws one bar of # per argument, where the bar for a value of n is n characters long and sits on its own line.
./histogram 4 1 3 | cat -eExpected result
####$
#$
###$For your own tracking. Tests grade your code.
./histogram 0 2 0 | cat -eExpected result
$
##$
$./histogram -3 | cat -eExpected result
$./histogram segfault | cat -eExpected result
$./histogram | cat -eExpected result
wrong number of arguments$Expected files
histogram.cAllowed functions
atoiwrite
v0.40: Create exercises. Challenge the community.
Meet Studio →Write a program that draws one bar of # per argument, where the bar for a value of n is n characters long and sits on its own line.
./histogram 4 1 3 | cat -eExpected result
####$
#$
###$For your own tracking. Tests grade your code.
./histogram 0 2 0 | cat -eExpected result
$
##$
$./histogram -3 | cat -eExpected result
$./histogram segfault | cat -eExpected result
$./histogram | cat -eExpected result
wrong number of arguments$Expected files
histogram.cAllowed functions
atoiwrite
Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.