Saturday, September 21, 2019

C++ Language Program for Subtraction of Two Numbers.

BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER
Here you will get simple C++ program 

C++ Language Program for Subtraction of Two Numbers.


IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.

IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.

User will input two numbers and that numbers is subtracted by Subtraction Logic ,then it subtract them and display on screen.

The program coding is given below.

#include <iostream.h>
#include <conio.h>
class SUB
{
int a,b,c;
public:
void getdata()
{
cout<<"Enter Any Two Number: ";
cin>>a>>b;
}
void display()
{
c=a-b;
cout<<"Subtraction is = "<<c;
}
};
void main()
{
clrscr();
SUB s1;
s1.getdata();
s1.display();
getch();
}

Output will be given after you compile it.

Friday, September 20, 2019

C++ Language Program for Addition of n Numbers.

BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER
Here you will get simple C++ program 

C++ Language Program for Addition of n Numbers.


IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.

IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.

User will input n Numbers and that Numbers is Added by Logic, Then it Addition will be display on screen.

The program coding is given below.

#include <iostream.h>
#include <conio.h>
class ADD
{
int n, sum;
public:
void getdata()
{
cout << "Enter a positive integer: ";
    cin >> n;
}
void display()
{
sum=0;
for (int i = 1; i <= n; ++i)
{
        sum += i;
    }
    cout << "Sum = " << sum;
}
};
void main()
{
clrscr();
ADD a1;
a1.getdata();
a1.display();
getch();
}

Output will be given after you compile it.

Thursday, September 19, 2019

C++ Language Program for Addition of Two Numbers.

BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER
Here you will get simple C++ program 

C++ Language Program for Addition of Two Numbers.


IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.

IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.

User will input Two Numbers and that Numbers is Added by Logic, Then it Addition will be display on screen.

The program coding is given below.

#include <iostream.h>
#include <conio.h>
class Add
{
int a,b,c;
public:
void getdata()
{
cout<<"Enter Two Number=";
cin>>a>>b;
}
void display()
{
c=a+b;
cout<<"Addition is = "<<c;
}
};
void main()
{
clrscr();
Add a1;
a1.getdata();
a1.display();
getch();
}

Output will be given after you compile it.

Wednesday, September 18, 2019

HOW TO CALCULATE AREA OF RECTANGLE USING VB PROGRAMMING.

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


  • To Calculate Area of Rectangle 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.
  • The Second Label for Output or Display of Calculate Area of Rectangle. 
  • 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 Rectangle

Private Sub cmdClick_Click()
Dim l As Integer, w As Integer
Dim area As Double
l = Val(Text1.Text)
w = Val(Text2.Text)
area = l * w
Label3.Caption = "Area of Rectangle is " & area
End Sub

Code Window

Output View
Design View




Monday, September 16, 2019

HOW TO CALCULATE AREA OF TRIANGLE USING VB PROGRAMMING.

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


  • To Calculate Area of Triangle 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.
  • The Second Label for Output or Display of Calculate Area of Triangle. 
  • 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 Triangle

Private Sub cmdClick_Click()
Dim h As Integer, b As Integer
Dim area As Double
h = Val(Text1.Text)
b = Val(Text2.Text)
area = (0.5) * h * b
Label3.Caption = "Area of Triangle " & area
End Sub

Code Window

Output View

Design View