Server Side Programming Articles

Page 1537 of 2109

Maximum sum and product of the M consecutive digits in a number in C++

Revathi Satya
Revathi Satya
Updated on 22-May-2024 454 Views

In this article, we are given a string representing a number. Our task is to create a program in C++ to find the maximum sum and product of M consecutive digits from the given number. We find all sequences of M consecutive digits and return the maximum sum and product. In mathematics, consecutive numbers are defined as those numbers that follow each other in increasing order from the smallest to the largest, with no missing numbers in between. This problem can be iterated through the string representation of the number, in other words, we consider consecutive segments of the length ...

Read More

Program to find the common ratio of three numbers in C++

Revathi Satya
Revathi Satya
Updated on 22-May-2024 559 Views

In this article, Our task is to create a Program to find the common ratio of three numbers in C++. The common ratio of three numbers is usually the same ratio between two numbers multiplied by each other to get the next one. When a particular number of terms in progression or sequence are involved such as in the geometric progression, a common ratio can be easily found by dividing the term with the preceding term. For instance, if we have three numbers x, y, and z. then the common ratio r can be found as r = x:y = ...

Read More

Program to find sum of series 1 + 2 + 2 + 3 + 3 + 3 + .. + n in C++

Revathi Satya
Revathi Satya
Updated on 22-May-2024 804 Views

In this article, we are given a number n that denotes the nth term of the series. Our task is to create a Program to find sum of series 1 + 2 + 2 + 3 + 3 + 3 + .... + n in C++. This series is different from the other because it include terms that are repeated according to their values. The series 1 + 2 + 2 + 3 + 3 + 3 + … + n consists of repeated terms that are repeated infinitely only by their value. Such illustration 1 comes once, ’2 twice’, ...

Read More

Program to find sum of given sequence in C++

Revathi Satya
Revathi Satya
Updated on 22-May-2024 967 Views

In this article, we are given two numbers n and k representing a series. Our task is to create a program in C++ that finds the sum of the sequence given below: The input cycle is the process of adding up all the numbers in the given sequence to get a single output. The process of recursion is frequently used in mathematics and may be implemented with sequences namely the arithmetic ones ( each term is acquired by adding a constant difference between the previous one) and the geometric sequence ( where each term is multiplied by a constant ratio with the former term ...

Read More

Program to find smallest difference of angles of two parts of a given circle in C++

Revathi Satya
Revathi Satya
Updated on 22-May-2024 399 Views

In this article, we will find the smallest difference in angles between two parts of a given circle using the C++ programming language. Before proceeding to the code, let’s first understand how we can calculate the angles to find the smallest difference between them. We are given the angles of all the pieces of the circle in the array. We have to join the pieces in such a way that the angle difference between the two pieces is the least. Let's go through the input and output scenario for better understanding. Here, we declare an array contianing three different angles ...

Read More

Program to find slope of a line in C++

Revathi Satya
Revathi Satya
Updated on 22-May-2024 2K+ Views

In this article, we will learn how to find the Slope of a line using a program. But before we proceed into the program, let's first understand what the Slope of a line represents in mathematics and how to compute it using its mathematics formula in C++. In mathematics, the Slope of a line is a numerical value that measures the line’s steepness and direction. It indicates the rate at which the line ups or down as you move along it from left to right (or horizontally). Generally, it is denoted by the letter "m". In mathematics, the steepness refers to the slope or gradient of a line. In terms of mathematical, ...

Read More

How are Outliers Determined in Seaborn using Boxplot?

Vasireddy Bindu Hasitha
Vasireddy Bindu Hasitha
Updated on 23-Apr-2024 2K+ Views

What are Outliers? Outliers are the data points or observations which are far from the other points in a dataset. Outliers are caused due to measurement error, data entry error or experimental error etc. Outliers can skew the dataset which effects in statistical analysis and can increase the standard deviation of the dataset further effecting model prediction. An outlier may be a valid data point or can be noise. For a better understanding let us look at an example scenario. Imagine you are collecting data of student's height (age between 9 to 12 years). Most of the students are around ...

Read More

Factorial of each element in Fibonacci series

Vaishnavi Tripathi
Vaishnavi Tripathi
Updated on 09-Feb-2024 880 Views

In this article, we will discuss a simple program which calculates the factorial of all the numbers present in the Fibonacci series smaller than a given nums. Problem Statement We are given a number and our task is to generate the factorial of all the numbers present in the Fibonacci series and smaller than the given number. Let us first understand the problem statement and requirements from the code solution with the help of examples. Input nums = 13 Output Fibonacci series up to 13 is 0, 1, 1, 2, 3, 5, So, the factorial ...

Read More

Overview of the C++ Language Binding in the ODMG Standard

sudhir sharma
sudhir sharma
Updated on 22-Jan-2024 1K+ Views

Introduction Diving into the world of data management and modeling can be a complex task, especially when dealing with standards like the Object Data Management Group (ODMG). Did you know that ODMG provides an essential standard for object-oriented database systems, including a C++ language binding? This article will guide you through an easy-to-understand overview of this very aspect of ODMG, highlighting its key features such as ODL constructs and transactions. Overview of the ODMG Standard The ODMG standard, developed by the Object Data Management Group (ODMG), provides a framework for managing object-oriented databases. It includes the Object Definition Language (ODL) ...

Read More

Check if two arrays of strings are equal by performing swapping operations

Disha Gupta
Disha Gupta
Updated on 22-Jan-2024 405 Views

The arrays of strings are a 2-dimensional array that stores characters in it. In C++ language we have an inbuilt function, with syntax − Syntax swap (first_datatype, second_datatype) which is used to perform swap operations on two elements, that is, exchange the values they carry. In the following, we are also supposed to do some exchange in positions of the elements of the string to get the expected output. However, we can get our output in a much easier way. Problem Statement Now, in this problem, we are provided with two arrays of strings (meaning arrays or ...

Read More
Showing 15361–15370 of 21,090 articles
Advertisements