Commit c608fb6b authored by Artak Yenokyan's avatar Artak Yenokyan

Merge branch 'branch4.17m' into 'master'

michael.davityan:exercise_04_17 See merge request bpcarm/trainings2017!1255
parents 8072b1eb b5672201
dbg: debug/exercise_04_17
debug/exercise_04_17: debug/exercise_04_17.o
g++ -Wall -Wextra -Werror -g3 $< -o $@
debug/exercise_04_17.o: debug/exercise_04_17.s
g++ -c -Wall -Wextra -Werror -g3 $< -o $@
debug/exercise_04_17.s: debug/exercise_04_17.ii
g++ -S -Wall -Wextra -Werror -g3 $< -o $@
debug/exercise_04_17.ii: exercise_04_17.cpp
g++ -E -Wall -Wextra -Werror -g3 $< -o $@
debug/exercise_04_17.ii: | debug
mkdir -p debug
rm -rf debug *.ii *.s *.o *.out .gitignore
test: debug/exercise_04_17
./debug/exercise_04_17 < > test1.out || echo "Test 1 is executing..."
diff test1.out test1.expected && echo PASSED || echo FAILED
.PRECIOUS: exercise_04_17.ii exercise_04_17.s
.SECONDARY: exercise_04_17.ii exercise_04_17.s
#include <iostream>
#include <climits>
#include <unistd.h>
if (::isatty(STDIN_FILENO)) {
std::cout << "Insert ten different integers.\n";
int counter = 1;
int largest = INT_MIN;
while (counter <= 10) {
int number;
std::cin >> number;
if (largest < number) {
largest = number;
std::cout << "Largest is " << largest << std::endl;
return 0;
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