draw a flowchart of a program that will compute for the average quiz of a student which has 5 quizzes. display the average quiz
What would the following program print out? (Answer without using a computer.)
1 void f( const int a = 5)
2 {
3 std :: cout << a*2 << " \ n";
4 }
5
6 int a = 123;
7 int main ()
8 {
9 f (1) ;
10 f (a ) ;
11 int b = 3;
12 f (b ) ;
13 int a = 4;
14 f (a ) ;
15 f();
16 }
Q3: Write a full program that adds three integers. Your solution should have a function named getSum that accepts three integer parameters and returns the sum of those three integers. Your main function should call the getSum function and assigns the return value to an int variable named result that is declared inside the main function. Your program should then print out the value stored in result. Submit the code and a copy of your output. Q4. Explain why, given your function from Q3, getSum(1,2,3.0) is a syntax error.
Write a full program that find the remainder. Your solution should have a function named findRemainder that accepts two integer parameters and returns the remainder. Your main function should call the findRemainder function and assigns the return value to an int variable named remainder that is declared inside the main function. Your program should then print out the value stored in remainder. Submit the code and a copy of your output.
Write a full program that adds three integers. Your solution should have a function named getSum that accepts three integer parameters and returns the sum of those three integers. Your main function should call the getSum function and assigns the return value to an int variable named result that is declared inside the main function. Your program should then print out the value stored in result. Submit the code and a copy of your output.
Write a program to output the following:
^ ^
( o o )
vHint: Copying and pasting the code above into each line of the programming environment will help you ensure that you are accurately spacing out the required characters.
Horizontal cabling in a structured cabling system connects the telecommunications room to the work areas on the buildings. This method of cabling is typically installed when the building is being initially assembled. Horizontal cabling is normally an unshielded twisted-pair cable or UTP. Some Special standards or principles regulate how long the cables should be installed in the building and where the horizontal cabling should be mounted to prevent electromagnetic interference. This kind of cabling is like “last mile” cabling before reaching a computer in a work area. Various components such as mechanical terminations, jumpers and patch cords located in the Telecommunication room are also involved. With the aid of a diagram, illustrate how horizontal cabling systems get connected from the telecommunications room to the work areas in the buildings. In your illustration, ensure you indicate various details that need to be involved, such as meters, etc.
Given the values for radius and height of a Cylinder, code a C program to calculate the Surface Area of the Cylinder. Function CalculateArea must accept height and radius as parameters.
r = radius
h = height
This assignment requires a C++ program be written to perform a vote counting and tallying procedure to gauge favorite holiday destinations of individuals. It should present the user with the question and a “ballot” of 5 holiday destinations and an exit/quit option. Once the program is started, it should allow the user to vote multiple times (same as in multiple users using the program to vote).
For example, the voting options might look like: *********** FAVORITE HOLIDAY DESTINATION OPINION POLL ***********
1. London
2. Paris
3. Rome
4. Sydney
5. New Zealand
6. Quit voting Please choose your favorite holiday destination from the list above by number
Note that the sixth menu item is the option to quit voting. If this option is selected, voting results (as discussed in the next paragraph) need to be printed before the program terminates. Print the total number of votes, individual votes for each item, and percentages in an easy to read table. .
Using ( switch ), write a program that asks the user to enter an integer of type (int) . The number represents the Section at the Faculty of Computer Science, the program prints the name of the section for the following options:
1- If the section number is "1"
"computer science" is printed
2- If the section number is "2"
"Information Technology" is printed
3- If the section number is "3"
"Networks" is printed
4- If the section number is "4"
"Software Engineering" is printed
In the case to enter any number other than the numbers shown above are printed
"error number , try again"