1. Write a program that will illustrate the use of a function for computing the square of a number. There must be three other functions aside from main(). The first function must be responsible for inputting the data, the second for computation of squares and the third, for Displaying the result. 10 points
Sample Run:
Input N: 3
The square of 1 is 1
The square of 2 is 4
The square of 3 is 9
2. Modify the program from number 1 by adding a class and apply the "outside of a class function". 20 points
Write a C++ program in Microsoft Visual Studio 2017, 2019 or 2022 that reads employee information from a text file named employees.txt and extract corresponding/matching gross monthly salaries (matched with unique employment number) from a file called salaries.txt.
The programme should then print the employment number, employee surname, employee name, gross monthly salary, monthly tax and net monthly salary for each employee to a file called report.txt in alphabetical order by surname then name.
You are encouraged to write functions and call them in the main function.
Write a C++ program to calculate the taxi fare using given conditions Distance in KM Cost in Rs. Per km 0 through 100 12 More than 100 but not more than 500 10 More than 500 but less than 1000 8 1000 or more 5
Write a program that prints the first letter of your name using nested loops
a program which get the value of three numbers x, y and z from user and check whether x and y are equal and greater than z
Write a program that takes as input from the user three sides of a triangle (numbers), checks and displays
whether the triangle is a right-angled triangle or not.
You are asked to draw the following stick figure on the screen-Design the problem and draw the structure chart.
Develop a program that uses structure to display the readings of a boiler process variables (temperature and pressure) on hourly and daily basis.
The output of the program should display the reading as shown below.
Boiler hourly reading:
Boiler readings for day: 25 and hour: 2
Pressure measurements: 25 Pascals
Temperature measurements: 40C
Write an encapsulated class Account as follows:
a) Include instance variable balance to store the amount and Title to store account
title.
b) Write 2 constructors, one will be default constructor and the second will be
augmented constructor which initializes the instance variable balance with non
negative value and Title with account name.
c) Provide a function to deposit money in the account
d) Provide a function to get the value of account
e) Also provide a function called debit that withdraws money from an Account.
Ensure that the debit amount does not exceed the Account’s balance. If it does, the
balance should be left unchanged and the method should print a message indicating
"Debit amount exceeded account balance."
Write main function to test class and function.
Create a class called Employee that includes
a) three instance variables—a first name (type String), a last name (type String) and
a monthly salary (double).
b) Provide a constructor that initializes the three instance variables.
c) Provide set and get functions for each instance variable. If the monthly salary is
not positive, do not set its value.
d) Write complete program. Create two Employee objects and display each object’s
yearly salary. Then give each Employee a 10% raise and display each Employee’s
yearly salary again.