Ayush Gupta has Published 530 Articles

Program to print last N lines in c++

Ayush Gupta

Ayush Gupta

Updated on 02-Jan-2020 05:42:18

391 Views

In this tutorial, we will be discussing a program to print the last N lines.For this, we will be provided with a string that consists of the new line character to denote the start of the next line and the number of lines to be printed from the last. Our ... Read More

Program to print last 10 lines in C++

Ayush Gupta

Ayush Gupta

Updated on 02-Jan-2020 05:40:26

216 Views

In this tutorial, we will be discussing a program to print the last 10 lines.For this, we will be provided with a string that consists of the new line character to denote the start of the next line. Our task is to start from the last and print all the ... Read More

Program to print Kite Pattern in C++

Ayush Gupta

Ayush Gupta

Updated on 02-Jan-2020 05:37:01

906 Views

In this tutorial, we will be discussing a program to print the given Kite pattern.For this, we will be taking the input as N=5. Our task is to print the given Kite structure with the overall height of 2N+1 = 5. This includes 9 lines for the upper diamond structure ... Read More

Program to print Inverse Diamond pattern on C++

Ayush Gupta

Ayush Gupta

Updated on 02-Jan-2020 05:31:01

392 Views

In this tutorial, we will be discussing a program to print given inverse diamond pattern.For this, we will be provided with the value of N. Our task is to print an inverse the diamond pattern according to the height of 2N-1.Example Live Demo#include using namespace std; //printing the inverse diamond pattern ... Read More

Program to print Interesting pattern in C++

Ayush Gupta

Ayush Gupta

Updated on 02-Jan-2020 05:26:34

259 Views

In this tutorial, we will be discussing a program to print a given interesting pattern.For this, we will be provided with the half-width of the pattern. Our task is to print a similar pattern according to the given width with its left and right portions being mirror images of one ... Read More

Program to print Hut in C++

Ayush Gupta

Ayush Gupta

Updated on 02-Jan-2020 05:20:47

276 Views

In this tutorial, we will be discussing a program to print a Hut pattern.For this, we will be provided with the width of the hut to be printed (say N). Our task is to print a hut structure of the given width using stars and a gate inside the hut ... Read More

Program to print an inverse pyramid character pattern in C++

Ayush Gupta

Ayush Gupta

Updated on 19-Dec-2019 10:50:43

272 Views

In this tutorial, we will be discussing a program to print an inverse pyramid character pattern.For this we will be provided with the number of rows containing in the inverted pyramid triangle. Our task is to print the alphabets in the given number of rows to develop the shape of ... Read More

Program to print all the numbers divisible by 3 and 5 in C++

Ayush Gupta

Ayush Gupta

Updated on 19-Dec-2019 10:46:24

1K+ Views

In this tutorial, we will be discussing a program to print all the numbers divisible by 3 and 5 less than the given number.For this we will be given with a number say N. Our task is to print all the numbers less than N which are divisible by both ... Read More

Program to print all substrings of a given string in C++

Ayush Gupta

Ayush Gupta

Updated on 19-Dec-2019 10:38:57

2K+ Views

In this tutorial, we will be discussing a program to print all the substring of a given string.For this we will be given with a string or an array of characters. Our task is to print all the substrings of that particular string.Example Live Demo#include using namespace std; //printing all the ... Read More

Program to print all palindromes in a given range in C++

Ayush Gupta

Ayush Gupta

Updated on 19-Dec-2019 10:36:25

476 Views

In this tutorial, we will be discussing a program to print all palindromes in a given range.For this we will be given the mathematical range in which the palindromes are to be found. Our task is to find all the palindromes in that range and print it back.Example Live Demo#include using ... Read More

Advertisements