[HackerRank][Kotlin]MegaPrime Numbers

This problem was asked in 'Daffodil unthinkable's' Campus drive's First online test round today, there were 3 problem, including this. I was able to solved this problem, later I got to know that this problem is also on HackerRank, In my test however instead of asking to print number of megaprimes, we were asked to … Continue reading [HackerRank][Kotlin]MegaPrime Numbers

[HOW-TO] use Graphics with Dev C++

Download "Graphics.h", "WinBGIm.h", libbgi.a" from hereCopy "Graphics.h" and "WinBGIm.h" to Following locations Dev-Cpp\MinGW64\x86_64-w64-mingw32\include Dev-Cpp\MinGW64\include And copy "libbgi.a" to Following Locations Dev-Cpp\MinGW64\lib Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib Then Go to 'Tools->Compiler Options->General->Linker Command Box' Paste the following -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 OR if you use project, paste these command into Project options->parameters->linker And then Chose '32-bit Profiling' You … Continue reading [HOW-TO] use Graphics with Dev C++

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

[.NET] DataGridView not showing the image from Data Table

Hey, there! recently working with my winform project, I came across a problem, I created a Data table programmatically and gave one column of it, the path to an image. I have done it many times, and it worked all the times before, but this time, the image didn't show, instead it said: "string.byte()" or … Continue reading [.NET] DataGridView not showing the image from Data Table