Posts

How to make a program to convert Binary into Decimal in C/C++

How to make a program to convert Binary into Decimal in C/C++ First of all, we are going to discuss the logic behind the conversion of Binary number into the Decimal number. Conversion of binary to decimal (base-2 to base-10) numbers and back is an important concept to understand as the binary numbering system forms the basis for all computer and digital systems. The decimal or “denary” counting system uses the Base-of-10 numbering system where each digit in a number takes on one of ten possible values, called “digits”, from  0  to  9 , eg. 213 10  (Two Hundred and Thirteen). But as well as having 10 digits ( 0 through 9 ), the decimal numbering system also has the operations of addition (  +  ), subtraction (  –  ), multiplication (  ×  ) and division (  ÷  ). In a decimal system, each digit has a value ten times greater than its previous number and this decimal numbering system uses a set of symbols,...

How to make C program to convert Fahrenheit into Celsius

How to make C program to convert Fahrenheit into Celsius Temperature conversion formula Temperature conversion formula from degree Celsius to Fahrenheit is given by - Celsius = 5/9(Farenhite - 32) The logic to convert temperature from Celsius to Fahrenheit The logic of temperature conversion exists in converting the mathematical formula to C expression. You just need to convert mathematical formula of temperature in C language. Rest is simple input/output. Below is the step by step descriptive logic to convert temperature from degree Celsius to Fahrenheit. Input temperature in Celsius from the user. Store it in some variable say  celsius . Apply formula to convert the temperature to Fahrenheit i.e. fahrenheit = (celsius * 9 / 5) + 32 Print the value of  Fahrenheit .                  Program to convert temperature from Celsius to Fahrenheit /** * C program to convert temperature from degree celsius to ...
Image
Tetris Game In JAVA Welcome back guys sorry for the delay but I am back with the new project "Tetris Game" an old school, so here are the steps to create this game  P.S.: Use Netbeans compiler To download Netbeans click  here If you guys want to download this file click  here Steps  1.) Create a new project and name it "Tetris". 2.) Create eight classes and name it "TetrisFrame","TetrisPanel","TetrisShape1","TetrisShape2","TetrisShape3","TetrisShape4","TetrisShape5" as shown in figure. 3.) Source Code for these classes is given below respectively. For class TetrisFrame  import java.awt.Color; import java.awt.Dimension; import java.awt.Toolkit; import javax.swing.JFrame; public class TretisFrame extends JFrame{ private static final long serialVersionUID = 1L; public TretisPanel pan; public Dimension dim; int l...