Posts

Showing posts with the label Vs Code

MinGW: Installation in 2022

Image
  Hello everyone, today we will install the MinGW installer and compiler in the perfect way so you can run your C or C++ code quickly without any errors. Before I have already discussed a MinGW compilation problem and many people found that very useful, you must check this if you have the same problem  Access-denied-in-vs-code-for-gcc So let's start, there are two things we have to understand, first there is a MinGW installer and a MinGW compiler. First, install the MinGW installer from this link:  MinGW-Installer After downloading click on the installer and it looks like this After installation, we have to install compilers, so follow the below images : As you will land on this page, now select only the selected ones in the image, and on the top-left, you can see an installation button, click on it and install these packages. Now we have to set the path for the MinGW so that our IDE and PC can recognize the compiler. Follow these steps :  File Manager > Windows(...

Simple Rock Paper Scissors Game(Java)

Image
Simple Rock Paper Scissors game with JAVA language : Code: import   java . util . Random ; import   java . util . Scanner ; // Rock Paper Scissor game in java // Sk Elaf Ahmed public   class   RockPaper  {      public   static   void   main ( String []  args ) {          //Rock = 0   Paper = 1   Scissor = 2         Scanner   sc  =  new   Scanner ( System . in );         int   playerScore  =  0 ,  compScore  =  0 ;                 for ( int   i  = 0 ;  i < 3 ;  i ++){             System . out . println ( "Enter...

HackerRank 30 Days Of Code Challenge, Day29(Ques 30 in Java)

Image
  Objective Welcome to the last day! Today, we're discussing bitwise operations. Check out the  Tutorial  tab for learning materials and an instructional video! Task Given set  . Find two integers,   and   (where  ), from set   such that the value of   is the maximum possible  and also less than a given integer,  . In this case,   represents the  bitwise AND  operator. Function Description Complete the  bitwiseAnd  function in the editor below. bitwiseAnd  has the following paramter(s): -  int N:  the maximum integer to consider -  int K:  the limit of the result, inclusive Returns -  int:  the maximum value of   within the limit. Input Format The first line contains an integer,  , the number of test cases. Each of the   subsequent lines defines a test case as   space-separated integers,   and  , res...