Commit a6f616f2 authored by Mikayel Ghaziyan's avatar Mikayel Ghaziyan

Mikayel Ghaziyan e4.25 Version 1

parent 91cdc17a
#include <iostream>
int
main()
{
int length;
std::cin >> length;
int i = 1;
int j = 1;
while(i <= length) {
while(j <= length) {
if (i == 1 || i == length || j == 1 || j == length) {
std::cout << "*";
}
else {
std::cout << " ";
}
j++;
}
std::cout << std::endl;
i++;
j = 1;
}
return 0;
}
exercise_04_25: exercise_04_25.o | .gitignore
g++ $^ -o $@
exercise_04_25.ii: exercise_04_25.cpp
g++ -E $^ -o $@
exercise_04_25.s: exercise_04_25.ii
g++ -S $^ -o $@
exercise_04_25.o: exercise_04_25.s
g++ -c $^ -o $@
.gitignore:
echo "exercise_04-25" > $@
clean:
rm *.ii *.s *.o *.out exercise_04_25 .gitignore
test1: exercise_04_25
./exercise_04_25 < test1.in > test1.out && echo "Test 1 is executing..."
diff test1.out test1.expected && echo PASSED || echo FAILED
.PRECIOUS: exercise_04_25.ii exercise_04_25.s
.SECONDARY: exercise_04_25.ii exercise_04_25.s
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