#include <iostream> using namespace std; bool Palindrome(string s,int start,int end){ if(s[start]!=s[end]) return false; if(start!=end) return (s,start+1,end-1); return true; } int main() { string s; cin>>s; cout<<(Palindrome(s,0,s.length()-1)?"yes":"No"); return 0; }
[C++]Calling main() Recursively
#include <iostream> using namespace std; static int i=5; int main() { cout<<i--<<endl; if (i!=0) main(); return 0; }
[C++][Problem] Find 2 Missing Numbers in a Range
// Created by Dinesh Solanki on 04-02-2019. #include <iostream> using namespace std; int firstNo,secondNo; int sum=0,missSum = 0,sumLessAvg = 0,sumGreatAvg = 0,avg,sumTillAvg = 0; void read(int n,int length) { int c; cin>>c; sum=sum+c; if (length > 1) { read(n,length-1); } missSum = (n*(n+1)/2)-sum; avg = missSum/2; if(c <= avg) sumLessAvg += c; else sumGreatAvg+=c; sumTillAvg … Continue reading [C++][Problem] Find 2 Missing Numbers in a Range
[C++]Print A line in reverse with recursion and without an array
/* Name: Print A line in reverse with recursion and without array Author: Dinesh Solanki Date: 27-09-18 19:02 */ #include<iostream> using namespace std; void reverse() { char c; c = getchar(); if (c != EOF) { reverse(); cout << c; } } int main() { reverse(); return 0; }
[C++][Problem] Print Diamond Pattern (Hollow Inside)
#include <iostream> using namespace std; int main() { int n,i,j,k; cin>>n; //Print upper Half for(i=0;i<n;i++) { for(k=i;k<n;k++) //Print Space cout<<" "; for(j=0;j<=i*2;j++) { if(j==0 || j==(i*2)) //Condition to print only Boundary cout<<"*"; else cout<<" "; } cout<<endl; } //Print Lower Half for(i=n;i>=0;i--) { for(k=n;k>i;k--) //Print Space cout<<" "; for(j=0;j<=(i*2);j++) { if (j == 0 || … Continue reading [C++][Problem] Print Diamond Pattern (Hollow Inside)
[c++][Problems] Window Problem
Hey there!, its been quite for a while, hasn't it?. well i got something, So my Professor gave me a Problem to solve Today, i thought you might find it interesting too, my solution is in C++, yours can be in any language, tell everyone in the comment, if you find another solution. The Problem … Continue reading [c++][Problems] Window Problem
[C++]QuickSort Array
QuickSort Program to Sort an Array in C++.
[C++] Parenthesis checker [Code_Problem]
PROBLEM : Given an expression string exp. Examine whether the pairs and the orders of “{“,”}”,”(“,”)”,”[“,”]” are correct in exp. For example, the program should print 'balanced' for exp = “[()]{}{[()()]()}” and 'not balanced' for exp = “[(])” Input: The first line of input contains an integer T denoting the number of test cases. Each … Continue reading [C++] Parenthesis checker [Code_Problem]
[C#] How to convert Data of a column(like from csv or excel) to an array
Hey reader, so I got caught in a silly thing again, I had CSV file that had 'language codes' and their English name, I wanted to use it for my winform application, with comboBox control, but I realized that demands a Data Table, and to put this Data that I had, I needed array so … Continue reading [C#] How to convert Data of a column(like from csv or excel) to an array
[ VB.NET ] Duplicates of Application.Designer.vb in the project
And here came a new problem, My Winform project was working all fine like always and suddenly an error came and it failed to build. The Errors read: 1. public sub new ' has multiple definitions with identical signatures 2. 'Protected Overrides Sub OnCreateMainForm()' has multiple definitions with identical signatures. and after having no luck … Continue reading [ VB.NET ] Duplicates of Application.Designer.vb in the project

