Write a program that
1. Contains a function that displays the content of an integer array starting from the upper
bound on a single line.
2. Contains a function that shits all elements of an integer array by one to the right and
move the last element into the first position. For example, 1 4 9 16 25 would be
transformed into 25 1 4 9 16.
3. Test the functions in (1) and (2) with the aid of an initialized array of your choice in
the main function. Display the array before and after the shifting of the elements.
Write a program that
1. Contains a function that displays the content of an integer array starting from the upper bound on a single line.
2. Contains a function that swaps the first and last elements of an integer array. For
example, 1 4 9 16 25 would be transformed into 25 4 9 16 1.
3. Test the functions in (1) and (2) with the aid of an initialized array of your choice in the main function. Display the array before and after the shifting of the elements.
Using the formulas given below, write a program that:
1. Prompts the user for the size (N) of the data set.
2. Creates an array to store values of the data set.
3. Prompts the user to enter the values of the data set.
4. Receive and save data entered by the user.
5. Display the mean, variance, and standard deviation (sd) of the data set received.
Mean (x–) =(x1 + x2 +......+ XN)/N
Variance =(x1 - x–)² +(x2 - x–) + ..... + (XN - x–)²/N
sd=√variance
Note:
1. You are at liberty to decide what your program should look like when executed. Just ensure the steps above are followed and your grammar and formatting are sound.
2. Solve manually with the data set entered to confirm your program output.
Write a function by using priority queue to merge two sorted arrays. The function will accept two integer
arrays and their sizes as arguments and then will merge them in ascending order and display the three
arrays.
Make use of stack data structure to reverse a string. The user will enter a string that may have several words and then print the string in reverse.
Zeller’s congruence is an algorithm developed by Christian Zeller to calculate the day of the week. The formula is
where: h=(q+²⁶(m+I)/10 + k/4 + i/4 + 5i)%7
• h is the day of the week (0: Saturday, 1: Sunday, 2: Monday, 3: Tuesday, 4: Wednesday, 5: Thursday, 6: Friday).
• q is the day of the month
• m is the month (3: March, 4: April, …, 12: December). January and February are counted as months 13 and 14 of the previous year.
• j is the century (i.e., Year/100).
• k is the year of the century (i.e., year%100)
Note that the division in the formula performs an integer division. Write a program that prompts the user to enter a year, month, and day of the month, and displays the name of the day of the
week. Here are some sample runs:
(Hint: January and February are counted as 13 and 14 in the formula, so you need to convert the user input 1 to 13 and 2 to 14 for the month and change the year to the previous year.)
Write a C++ program to check for the balancing symbols in C++, the symbols can be /* */, [],
{}, and ().
Computer Programming teacher conducts test for 20 marks for 10 students. Teacher wants to know the average marks scored by the students.
Following are requirements to solve the problem
Teacher should have capture the marks scored by the student.
Teacher should compute the average marks scored by the students.
Teacher should display the average marks scored by the students.
Computer Programming teacher conducts test for 20 marks for 10 students. Teacher wants to know the average marks scored by the students.
Create frame to display two buttons named "Click Me-1" and "Click Me-2". If you click on the "Click Me-1" button then a JOptionPane Message dialog box should display message " you have clicked Click Me-1 button" and
If you click on the "Click Me-2" button then a JOptionPane Message dialog box should display message " you have clicked Click Me-2 button". Clicking on the cross button in the frame should exit the program.
Write a program that would print the information (nume, year of joining. salary, address) of three employees by creating a class named 'Employee
The output should be as follows:
Name Year of joining Address
Roma. 1994. 64C, Jaipur
Ramya. 2000. 68D-Udaipur
Teena. 1999. 26B-Kota