Note
- Work on an assignment by yourself without sharing the answer to a classmate. (It is great that students study together but an assignment is an individual task. It is not a group project.)
- Start to do an assignment early and ask the teacher if you have a question.
- Add a comment with your name at the top of your source code
- Put all your files that you want to submit into one zip file
1. Please save the program with the name ‘cal.c’
Write a program to input two integer values and out their sum and their difference. A sample run off the program follows. The user input is represented in boldface in the sample run. (page. 56, C by Discovery 4th edition, by Foster & Foster)
1 |
Example: |
2. Please save the program with the name ‘guess.c’
Write a C program that plays a number guessing game with the user. A sample run for the game follows. User input is shown in boldface in the sample run. (C by discovery)
1 |
Welcome to the game of Guess It! |
The following code will print out a random generator between 1-100 ten times.
1 |
|
近期评论