Write an algorithm for a program that prompts the user to enter the radius of a circle, and then calculate its area
Write an algorithm for a program that prompts the user to enter the radius of a circle, and then calculate its perimeter
Write a program to find out the greatest between two numbers defined in two different classes by using friend function.
Write a menu driven program to perform the following operations in a header linked
list by using suitable user defined functions for each case. The head node keeps the
count of the total number of nodes in the list. The data node keeps the student
information: Name, Roll No, CGPA, Address_City, Branch.
1. Create
2. Display student information
3. Display the total number of nodes (in O(1) time)
4. Display the students’ details belonging to a particular branch
5. Display the students’ details securing > 7.5 CGPA and belonging to a given
branch.
Explanation of the program
[Explain (where applicable)
l how the loop executes
l · how the written function works
l · and anything that you think is necessary
Explanation of the program
[Explain (where applicable)
l how the number of decimal point was set
l · function(s) that was taken from library & which library
l · the logical path of if/else, switch structure
l · choice of loop (why for loop or while loop)
Explanation of the program
[Explain (where applicable)
l · the declarations of the header file
l · choice of variable type
l · purpose of cout/cin statement in your program
l · how the alignment was done
Write and test the following computeTriangle() function that returns the area a and the
perimeter p of the triangle with given side lengths a, b, c:
void computeTriangle( float&, float&, float, float, float);
Implement a C++ function which, when given the length of a simple pendulum in meters,
returns the period of oscillation in seconds, i.e.
period of oscillation = 2 π (length / g)
where Standard Gravity, g = 9.80665 metres/sec2
Implement a main function which reads the pendulum length, calls the above function and
prints the result. A pendulum of length 1 meter has a period of 2.006409 seconds.
Implement a C++ function “reactance()” which evaluates the reactance of a series circuit
consisting of an inductor L and capacitor C at frequency f:
reactance = 2π fL - 1/2π fC
Implement a main function which reads the values of L, C and f, calls the above function
and prints the reactance, e.g. if L =0.2 henries, C =2 μ farads and f = 50 Hz the reactance
will be –1528.717 Ω.