Sunday, September 15, 2019

C++ Language Program for Sort Any Array in Descending Order.

BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER

Here you will get simple C++ program 
C++ Language Program Sort Any Array in Descending Order.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.

User will input will be an unsorted form in Array and that Array is sorted by Descending Order,then it will be display on screen.


The program coding is given below.
#include<iostream.h>
#include<conio.h>
class Sort
{
int a[20],i,j,temp;
public:
void getdata()
{
cout<<"Enter elements of array:\n";
for(i=1;i<=5;i++)
cin>>a[i];
}
void sort()
{
temp=0;
for(i=1;i<=5;i++)
{
    for(j=1;j<=5;j++)
    {
       if(a[i]>a[j])
       {
temp=a[i];
a[i]=a[j];
a[j]=temp;
       }
    }
}
}
void display()
{
cout<<"Array after sorting:\n";
for(i=1;i<=5;i++)
{
cout<<" "<<a[i];
}
}
};
void main()
{
clrscr();
Sort s1;
s1.getdata();
s1.sort();
s1.display();
getch();
}
Output will be given after you compile it.

C++ Language Program To Traverse Array.

BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER

Here you will get simple C++ program 
C++ Language Program To Traverse Array.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.

User will input will be in any order in Array and that Array is Traverse by Traversing ,then it will be display on screen.


The program coding is given below.
#include<iostream.h>
#include<conio.h>
class Node
{
int i,a[10];
public:
void getdata()
{
cout<<"Enter Number in Array=\n";
for(i=1;i<=5;i++)
{
cin>>a[i];
}
}
void display()
{
cout<<"\nArray\n";
for(i=1;i<=5;i++)
{
cout<<" "<<a[i];
}
}
};
void main()
{
Node n1;
clrscr();
n1.getdata();
n1.display();
getch();
}
Output will be given after you compile it.

Monday, September 9, 2019

HOW TO CALCULATE CIRCUMFERENCE OF CIRCLE USING VB PROGRAMMING.

Hi Friends Today i will show you how you can be Calculate Circumference of Circle in VB(Visual Basic 6.0)


  • To Calculate Circumference of Circle you need to insert Two Label Control's.
  • And another Control's need to insert is  One Text box Control.
  • One Command button is placed to the form.
  • As Shown in Picture Arrange it.
  • The Second Label for Output or Display of Calculate Circumference of Circle. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Area of Circumference

Private Sub cmdClick_Click()
Dim r As Integer
Dim circum As Double
r = Val(Text1.Text)
circum = 2 * 3.14 * r
Label2.Caption = "Circumference of Circle is " & circum
End Sub
Code Window

Output View

Design View

Sunday, September 8, 2019

HOW TO CALCULATE AREA OF CIRCLE USING VB PROGRAMMING.

Hi Friends Today i will show you how you can be Calculate Area of Circle in VB(Visual Basic 6.0)


  • To Calculate Area of Circle you need to insert Two Label Control's.
  • And another Control's need to insert is  One Text box Control.
  • One Command button is placed to the form.
  • As Shown in Picture Arrange it.
  • The Second Label for Output or Display of Calculate Area of Circle. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Area of Circle

Private Sub cmdClick_Click()
Dim r As Integer
Dim area As Double
r = Val(Text1.Text)
area = 3.14 * r * r
Label2.Caption = "Area of Circle is " & area
End Sub
Code Window

Output View

Design View

Saturday, September 7, 2019

HOW TO CALCULATE DIVISION TWO NUMBER'S USING VB PROGRAMMING.


Hi Friends Today i will show you how you can be Calculate Division in VB(Visual Basic 6.0)


  • To Make an Division you need to insert Two Label Control's.
  • And another Control's need to insert is  Two Text box Control.
  • One Command button is placed to the form.
  • As Shown in Picture Arrange it.
  • Also Placed Another Label for Output or Display of Calculation of Division. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Division

Private Sub cmdClick_Click()
Dim n1 As Integer, n2 As Integer, div As Integer
n1 = Val(Text1.Text)
n2 = Val(Text2.Text)
div = n1 / n2
lblOutput.Caption = "Division is " & div
End Sub
Code Window

Output View
Design View