Bhanu Priya has Published 1581 Articles

C program to compute the polynomial regression algorithm

Bhanu Priya

Bhanu Priya

Updated on 01-Sep-2021 12:37:39

2K+ Views

Regression is a predictive modelling technique that investigates the relationship between a dependent and non-dependent variable.Polynomial regressionIt is a form of regression analysis that shows the relationship between an independent variable x and the dependent variable y that is modelled a nth degree polynomial in x.ExampleFollowing is the C program ... Read More

C program to change the file name using rename() function

Bhanu Priya

Bhanu Priya

Updated on 01-Sep-2021 09:08:30

2K+ Views

The rename function changes a file or directory from oldname to newname. This operation is just like a move operation. Hence, we can also use this rename function to move a file.This function is present in stdio.h library header files.The syntax of rename function is as follows −int rename(const char ... Read More

C program to compute geometric progression

Bhanu Priya

Bhanu Priya

Updated on 01-Sep-2021 09:06:43

1K+ Views

ProblemWrite a program to read two numbers, x and n, and then compute the sum of the geometric progression.1+x+x2+x3+x4+……….+xnAnd then, print x, n and sum.SolutionThe solution to compute the geometric progression in C programming language is given below −AlgorithmRefer an algorithm to compute the geometric progression.Step 1 − StartStep 2 ... Read More

C program to convert roman numbers to decimal numbers

Bhanu Priya

Bhanu Priya

Updated on 01-Sep-2021 09:04:49

2K+ Views

Given below is an algorithm to convert roman numbers to decimal numbers in C language −AlgorithmStep 1 − StartStep 2 − Read the roman numeral at runtimeStep 3 − length: = strlen(roman)Step 4 − for i = 0 to length-1 do      Step 4.1 − switch(roman[i])        ... Read More

C program to sort a given list of numbers in ascending order using Bubble sort

Bhanu Priya

Bhanu Priya

Updated on 01-Sep-2021 08:37:58

4K+ Views

In C programming language, bubble sort is the simplest sorting technique and is also called as an exchange sort.Procedure for bubble sortCompare the first element with the remaining elements in the list and exchange(swap) them, if they are not in order.Repeat the same for other elements in the list until ... Read More

C program to compute linear regression

Bhanu Priya

Bhanu Priya

Updated on 31-Aug-2021 13:57:57

6K+ Views

ProblemWrite a program to implement linear regression algorithm.User has to enter total number of values.SolutionThe solution to compute the linear regression in C programming language is as follows −Linear regression finds the relationship between two variables by connecting a linear equation to the observed data. One variable is to be ... Read More

C Program to delete n characters in a given string

Bhanu Priya

Bhanu Priya

Updated on 31-Aug-2021 13:21:34

4K+ Views

ProblemWrite the user functions to Delete N – Characters from Position in a given string. Here, the string is given by the user at runtime.SolutionThe solution to delete n characters in a given string is as follows −AlgorithmRefer an algorithm to delete n characters in a given string.Step 1 − ... Read More

C program to find GCD of numbers using non-recursive function

Bhanu Priya

Bhanu Priya

Updated on 31-Aug-2021 13:19:29

6K+ Views

ProblemFind the greatest common divisor (GCD) for the given two numbers by using the non-recursive function.SolutionIt is explained below how to find the greatest common divisor (GCD) for the given two numbers by using the non-recursive function.AlgorithmRefer an algorithm given below to find the greatest common divisor (GCD) for the ... Read More

C program to find GCD of numbers using recursive function

Bhanu Priya

Bhanu Priya

Updated on 31-Aug-2021 13:17:25

22K+ Views

ProblemFind the greatest common divisor (GCD) for the given two numbers by using the recursive function in C programming language.SolutionThe solution to find the greatest common divisor (GCD) for the given two numbers by using the recursive function is as follows −AlgorithmRefer an algorithm given below to find the greatest ... Read More

C program to calculate sum of series using predefined function

Bhanu Priya

Bhanu Priya

Updated on 31-Aug-2021 13:14:41

671 Views

ProblemThe program to calculate the sum of the following expressionSum=1-n^2/2!+n^4/4!-n^6/6!+n^8/8!-n^10/10!User has to enter the value of n at runtime to calculate the sum of the series by using the predefined function power present in math.h library function.SolutionIt is explained below how to calculate sum of series using predefined function.AlgorithmRefer an ... Read More

Advertisements