Programming with Passion

Make the best out of everything.

Wednesday, 27 November 2019

undefined 201

Snake Game using javascript (P5.js)

Snake Game using javascript (P5.js) Follow me at Instagram here. Subscribe to my youtube channel here. Just learnt something new called P5.js and tried this classic snake game, back in the days I tried it in C++ also, click here to check that one out. With P5 it looks better. For any suggestion...

Thursday, 7 November 2019

undefined 201

Juspay Interview Experience

Juspay Interview Experience 2020 About Juspay Juspay Technologies Pvt Ltd. provides mobile payment solutions. Founded in 2012 by Vimal Kumar and Ramanathan, with a vision to redefine online payments experience by providing 1-click payments on web and mobile, Bangalore-based Juspay Technologies has come a step...

Thursday, 5 September 2019

undefined 201

Diamond Patter using only one while loop | Yamaha Interview Question

Diamond Patter using only one while loop This problem was asked in Yamaha Interview. Please consider doing it yourself before looking at the answer. #include<stdio.h> int main(){     int line = 1, p = 25, sp=2, st=1; int spptr = 0, stptr = 0;     while(p--){         if(spptr < sp){             printf("  ");             spptr++;         }         else if (stptr < st){             printf("* ");             stptr++;         }         else{             printf("\n");             line++;             sp = 3 - line;             if (sp<0)                 sp = -sp;             st = (line*2)-1;             if(line>3){                 st = st%4;             }              spptr = 0;             stptr = 0;         }     } } Here...

Tuesday, 25 June 2019

undefined 201

Merge Sort Visualisation

Merge Sort Visualisation in C In this program 100 random numbers are generated which are represented on x-y graph using lines and merge sort is applied on the array, as elements changes their position the graph is redrawn and the visualisation can be seen. Also current position of index is shown by red lines. Below...

Saturday, 22 June 2019

undefined 201

Taking a non-standard input format

Scanf Taking a non-standard input format #include <cstdio>  using namespace std; int N; // using global variables in contests can be a good strategy  char x[110];  // make it a habit to set array size a bit larger than needed int main() {  scanf("%d\n", &N);  while...

Monday, 14 May 2018

undefined 201

2048 C++ code

2048 C++ code If you find any bugs in this game do comment and let me know.  My GitHub repositoryhttps://github.com/Rishabh1998/2048 C++ code  #include<graphics.h> #include<conio.h> #include<iostream.h> #include<stdio.h> #include<stdlib.h> #include<time.h> #include<dos.h> #include<process.h> #include<fstream.h> int...

Tuesday, 21 November 2017

undefined 201

Example for Gui, Event handling and multi threading in JAVA

import java.awt.event.*; import javax.swing.*; import java.awt.FlowLayout; import java.awt.Font; import java.util.Date; class calc extends JFrame implements ActionListener,Runnable { private JLabel n1,n2,r,c; private JTextField f1,f2,f3; private JButton a,s,m,d; Thread th,dt; public calc(){ super("CALCULATOR"); ...
Page 1 of 2912329Next