Develop a C++ program to calculate sum of square root from 1 to n numbers using recursive functions.
Create the class Circle with attribute radius to find the area of circle. Assign the values for data member using copy constructor and display the result. Finally free the resources of data objects using destructor member function. (Note: Area of circle = 3.14 * radius * radius)
Design a class Calendar to calculate number of years, months and days. The member variables are nds, years, months and days. The member functions are d() which accepts number of days and display() to display total number of years, months and days.
Write a function second_last_digit in C++ and call function that print the second last digit of the given number. The second last digit is being referred to the digit in the tens place in the given number.
For example, if the given number is 197, the second last digit is 9.
Note 1 - The second last digit should be returned as a positive number. i.e. if the given number is -197, the second last digit is 9.
Note 2 - If the given number is a single-digit number, then the second last digit does not exist. In such cases, the program should print -1. i.e. if the given number is 5, the second last digit should be print as -1.
Develop a C++ program to display the string in left and right justifications. Specify the width as 20 and consider the special character to be filled as ‘&’.
Write a program that print the second last digit of the given number. The second last digit is being referred to the digit in the tens place in the given number.
For example, if the given number is 197, the second last digit is 9.
Note 1 - The second last digit should be returned as a positive number. i.e. if the given number is -197, the second last digit is 9.
Note 2 - If the given number is a single-digit number, then the second last digit does not exist. In such cases, the program should print -1. i.e. if the given number is 5, the second last digit should be print as -1.
Write a program to find the count of unique digits in a given number N. The number will be passed to the program as the input of type int.
Assumption: The input number will be a positive integer number>=1 and <= 25000.
For e.g.
If the given number is 292, the program should print 2 because there are only 2 unique digits "2" and "9" int this number.
Write overloaded function named Sort that takes array of integers, float numbers and
characters. Get the user input and display it in the sorted order.
Determine a and b for which f(x) = a sin(πx/2) + b cos(πx/2) fits the following data in the least-squares sense:-
(solve using MATLAB with steps).
x = −0.5, −0.19, 0.02, 0.20, 0.35, 0.50.
y =−3.558 , −2.874 , −1.995 , −1.040, −0.068, 0.677.
Write a function Unique_Occurance and call the function to find the count of unique occurrence digits in a given number N. The number will be passed to the program as the input of type int.
Assumption: The input number will be a positive integer number>=1 and <= 25000.
For e.g.
If the given number is 292, the program should print 1 because there are only 1 unique occurrence digit "9" int this number.