Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Title: This program will use a function to find product
- of two numbers
- Author: Steven Su
- Date: September 21 2014
- Description: You will be asked from function product() to enter
- 2 numbers from the keyboard. The function product()
- will calculate and output the product and return control
- to main().
- */
- // INCLUDE SECTION
- #include <stdio.h> // def's 4 scanf, printf, getchar, fflush, puts.
- #include <conio.h> // def's 4 getch
- #include <stdlib.h> // def's 4 system
- // FUNCTION PROTOTYPES
- void product (void);
- int main(void)
- {
- system("cls");
- product(); // function call
- system("pause");
- }
- // FUNCTION DEFINITIONS
- void product(void)
- {
- // VARIBLE DECLARATIONS
- float num1,num2,answer;
- // EXPLAIN TO USER
- puts;("You will be asked from function product() to enter");
- puts;("2 numbers from the keyboard. The function product()");
- puts;("will calculate and output the product and return control");
- puts;("to main().");
- puts("");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement