Programming in C

profileStudent_198
ProgAssgn_1.pdf

PROGRAMMING ASSIGNMENT #1

Write a C program that calculates and prints the sum, difference, product, quotient, and remainder (modulus) of two integer numbers. You will use two numbers different from the numbers that I use. One of the statements in your program should be the following, but with different numbers (do not use zero for either number):

int num1 = 60, num2 = 25;

Once you create, compile, link and run your program, your program should output with the following format:

The two numbers used by this program are 60 and 25. The sum is 85 The difference is 35 The product is 1500 The quotient is 2 with a remainder of 10 Thank you for using the program. Note: The blue text represents the "output" from your program and is shown for clarity only here. It is not required that your output be in this color. (Do not even attempt to try!). The terms sum, difference, product, and quotient refer to the operations of addition, subtraction, multiplication and division.

Also, you need to use numbers other than 60 and 25 in your program. You can use any numbers you wish except zero. Important: The correct output spacing and rhetoric is part of the program too. Hints:

 The terms sum, difference, product, and quotient refer to the operations of addition, subtraction, multiplication and division.

 This program can be accomplished with all integer variables (I used 7).

 This program can be accomplished in about 12 lines of code (not including variable declarations, comments, or blank lines). Don’t worry if you need more lines of code.

 You should have a line in your program that looks something like:

int num1 = 60, num2 = 25;

Good luck! 