/This is a simple program demonstrating how to execute a function
/from within the main function
/Here we create a function called myFunction.
/All it does is output one statement.
/This is a simple program demonstrating how to use value-returning functions
/Here we create a function called myValueFunction.
/It asks the user to input a number.
/By returning x, we are essentially setting myValu
/This is a simple program demonstrating how to use functions with parameters
/Here we create a function called addThese.
/It accepts two integers as parameters, and then returns the sum.
int addThese(int a, int b)
Lab Assignment #3
Write a C+ program that will get two numbers as input from the user, then display the
following output using those variables.
The first number is (number1).
The second number is (number2).
Write a C+ pro
Write a program using IF-ELSE statements that will ask as input for todays temperature.
If the temperature is above 80 degrees, display a message saying It is very hot today!.
If the temperature is below 40 degrees, display a message s
Loop Practice Activities
Create a program that will ask the user to enter a number. Write a loop that subtracts one
from that user-inputted number, and keeps subtracting one until the number is down to
zero. Here is a sample output:
Enter a n
Write a program with two functions: calculateIt and main. In the main function you
will ask the user two enter a floating-point number with a decimal. Then call the
calculateIt function and pass that number as a parameter. The calculat
Lab Activity #7
Write a program that declares an array named alpha with 50 components of the type
double. Initialize the array so that the fist 25 components are equal to the square of
the counter (or index) variable and the last 25 component
Final Lab Assignment
Write a C+ program that declares a two-dimensional array named myFancyArray of the
type double. Initialize the array to the following values:
1. Create a function tha