Posts

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(C:) > MinGW

Online BMR Calculator- Easy to use

Image
BMR Calculator Age Gender Male Female Height cm Weight kg Calculate 1,640 Calories/day Please enter all details correctly.

Patterns in Cpp/ C ( Mixex: Numbers, Stars, Numbers)

Image
  Print this star pattern: Code: If you guys have any questions regarding the solution then comment down your quaries.

Java Exception Handling: HackerRank

Image
  You are required to compute the power of a number by implementing a calculator. Create a class  MyCalculator  which consists of a single method  long power(int, int) . This method takes two integers,   and  , as parameters and finds  . If either   or   is negative, then the method must throw an exception which says " ". Also, if both   and   are zero, then the method must throw an exception which says " " For example,  -4  and  -5  would result in  . Complete the function  power  in class  MyCalculator  and return the appropriate result after the power operation or an appropriate exception as detailed above. Input Format Each line of the input contains two integers,   and  . The locked stub code in the editor reads the input and sends the values to the method as parameters. Constraints Output Format Each line of the output contains the result  , if both   and   are positive. If either   or   is negative, the output contains "n and p should be non-negative&quo