[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++][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++] 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