Commit 0e05e92f authored by Believer Programmers' Club's avatar Believer Programmers' Club

Merge branch 'exercise_05_13' into 'master'

Mary Zaqaryan Exercise_05_13 Version1

See merge request bpcarm/trainings2017!1356
parents 77408e1e 8860528e
#include <iostream>
int
main()
{
for (int i = 1; i <= 5; ++i) {
int number;
std::cin >> number;
if (number < 1 || number > 30) {
std::cerr << "Error 1: Input number from 1 to 30.";
return 1;
}
for (int j = 1; j <= number; ++j) {
std::cout << "*";
}
std::cout << std::endl;
}
}
exercise_05_13: exercise_05_13.o | .gitignore
g++ $^ -o $@
exercise_05_13.ii: exercise_05_13.cpp
g++ -E $^ -o $@
exercise_05_13.s: exercise_05_13.ii
g++ -S $^ -o $@
exercise_05_13.o: exercise_05_13.s
g++ -c $^ -o $@
.gitignore:
echo "exercise_05_13" > $@
removes:
rm *.ii *.s *.o *.out exercise_05_13 .gitignore
test: exercise_05_13
./exercise_05_13 < test.in > test.out
diff test.out test.expected > /dev/null 2>&1 && echo PASSED || echo FAILED
*******
*********
************************
**************
**
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment