https://github.com/markpatterson27/simple-cpp-exercises
GitHub Classroom example for autograding C++ input/output exercises.
https://github.com/markpatterson27/simple-cpp-exercises
Last synced: about 1 year ago
JSON representation
GitHub Classroom example for autograding C++ input/output exercises.
- Host: GitHub
- URL: https://github.com/markpatterson27/simple-cpp-exercises
- Owner: markpatterson27
- License: mit
- Created: 2022-02-26T08:43:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-26T11:21:13.000Z (over 4 years ago)
- Last Synced: 2025-03-29T05:22:45.262Z (about 1 year ago)
- Language: C++
- Homepage:
- Size: 9.77 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple C++ Exercises

In this exercise, learners/lecturers will write simple C++ programs that accept user input and then output responses to the command line. Learners will then test their programs by pushing them to their GitHub repo and checking the output from automated tests.
## Exercise 1
1. Using the `HelloWorld.cpp` file, create a program that outputs "Hello World!".
1. Push your changes back to your assignment GitHub repo. Remember to try to make your commits atomic and your commit messages descriptive.
1. Wait a minute for the tests to run. Refresh the repo page to see if you have completed the exercise successfully. You should score 10 marks if the test passes.
## Exercise 2
1. Using the `YourName.cpp` file, create a program that asks the user for their name.
2. The program should then output the text `"Your name is "` followed by the user's name.
1. Push your changes back to your assignment GitHub repo. Remember to try to make your commits atomic and your commit messages descriptive.
1. Wait a minute for the tests to run. Refresh the repo page to see if you have completed the exercise successfully. You should score 10 marks if the test passes.
## Exercise 3
1. Using the `Sum.cpp` file, create a program that asks the user to enter 2 integers.
2. The program should then output the sum of the 2 numbers.
1. Push your changes back to your assignment GitHub repo. Remember to try to make your commits atomic and your commit messages descriptive.
1. Wait a minute for the tests to run. Refresh the repo page to see if you have completed the exercise successfully. You should score 10 marks if the test passes.