Skip to content
Snippets Groups Projects
Commit cd90bade authored by Christoph Anton Mitterer's avatar Christoph Anton Mitterer
Browse files

Merge branch 'read-number-from-stdin' of ssh://gitlab.physik.lmu.de/GDuckeck/git-course-example-3

Merged Günters changes into my changes.
parents fb7256b8 59f010b8
Branches master
No related tags found
No related merge requests found
project(prime-number-test)
add_executable(prime-number-test prime-number-test.c++)
......@@ -20,9 +20,12 @@ bool is_prime(int number)
int main(int argc, char* argv[])
{
int number = 73; //why 73?
int number;
//read number from standard input
std::cout << "Enter an integer number: ";
std::cin >> number;
//print results
if( is_prime(number) )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment