Armstrong Number in Java

Armstrong Number in Java

Program to Check Armstrong Number Armstrong number is that number which is of three  integer digits, which sum of the cube of its individual digits is equal to that number which we enter like 153, the cube of 1 and the cube of 5, and the cube of 3 and the sum of both (1*1*1)+(5*5*5)+(3*3*3)=153 … Read more

Draw a Chessboard in Java Applet

Draw a Chessboard in Java Applet

Java Program for Chess Game Each square(rectangle) in the chessboard is 20 pixels by 20 pixels. The squares are grey and black. If the row and column are either even or odd, then the color is Grey. Otherwise, change the color to Black. import java.awt.*; import java.applet.*; public class Checkerboarrd extends Applet {    public … Read more

Accessing Interface in Java

Accessing Interface in Java

The variables(int blue, int yellow, int pink) of an interface are always declared as final. Final variables are those variables, whose values are constants and can’t be modified(changed). The class that implements the interface will use the variables as declared within the interface and can’t modify( changed) the value of the variable. How to define … Read more

2D Array in Java

2D Array in Java

In Java, multidimensional arrays are also applied as arrays of arrays. 2D(two-dimension i.e tabular form) array is the generally used and simplest multi-dimensional array(like excel sheet(grids)). 2D arrays are represented in a row-columns([3][4]) form, and the terms “rows”[3]  and  “columns”[4] are used in computing. Syntax…. Declaration – Syntax:                Data_Type[][] Array_Name = new int[Row_Size][Cols_Size];       … Read more

What is DOS?

What is DOS

Disk Operating System (DOS command user interface) – it is a collection of special programs that supervise and control the operation of the personal computer.Functions of DOS: (a.) interprets and executes commands. (b.) manages the disks, files and directories. (c.) oversees and communicates with peripheral devices.Parts of DOS: A) DOS System Files – it consists … Read more

Calculator in C++

Calculator in C++

Calculator that performing as calculator which allows all Arithmetic Operators with operands as input #include<iostream.h> #include<stdlib.h> #include<conio.h> int calculator(int a,char c,int b) {     int h,w,x,z;     float y,m=0.0;     z=(a+b);     x=(a*b);     w=(a-b);     h=(a%b);     y=(a/b);     m=y;     switch(c)     {     case ‘+’:         cout<<a<<“+”<<b<<“=”<<z<<endl;         break;     case ‘-‘: … Read more

Count of Odd and even,sum of odd and even,average array program in C++

Count of Odd and even,sum of odd and even,average array program in C++

/* Fill up an array,print the array,count number of values,count the number of odd,count the number of even,sum  of odd ,sum of even,average,find largest value,find smallest */ #include<iostream.h> int fill_up(int array[],int size); void main() {     int array[10],size;     cout<<“Enter the size of an array:”<<endl;     cin>>size;     fill_up(array,size); } int fill_up(int array[],int size) {     … Read more

Structure of C++ Program

Structure of C++ Program

A program is a sequence of logical instructions that can be executed by a compiler in a computer. All programs are written to solve any problem by programming language. The best way to learn a programming starts from the root of that language. Therefore, here we will try to write our first program: Step-1: // … Read more

Access Modifiers in Java

Access Modifiers in Java

ACCESS MODIFIERS……. Access modifier is a reserve key word  or we can say visibility controls which is used to restrict access.We can use these access modifier  to determine whether  a fields or methods in a class ,can be called or used by another class or sub class or not.That means these access modifiers can prevent … Read more

What is C Programming?

What is C Programming

The C Programming language is more than 40 years of old. It got its name because it was influenced by a now almost forgotten programming language called B(which was in turn derived from BCPL) C has gone on to spawn a lot other languages, utilized for both general and niche purposes.C itself, though, has never … Read more