Friday, September 6, 2019

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

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


  • To Make an Subtraction 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 Subtraction. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Subtraction

Private Sub cmdClick_Click()
Dim n1 As Integer, n2 As Integer, sb As Integer
n1 = Val(Text1.Text)
n2 = Val(Text2.Text)
sb = n1 - n2
lblOutput.Caption = "Subtraction is " & sb
End Sub
Code Window
Output View
Design View 




Wednesday, September 4, 2019

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


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


  • To Make an Addition 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 Addition. 
  • In this Example I used default names of Control.  
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Addition

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

Output View

Design View





Tuesday, September 3, 2019

HOW TO SWAP TWO NUMBER'S USING VB PROGRAMMING.

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


  • 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 for Swapping Of Number . 
  • In this Example I used default names of Control.  
  • Here We Use an Function(vbCrLf) which is used to separate line Ok.
  • Also we concatenate the Strings value to show proper Output in Label Control. 

Coding of Swapping Of Number

Private Sub cmdClick_Click()
    Dim n1 As Integer, n2 As Integer, temp As Integer
    n1 = Val(Text1.Text)
    n2 = Val(Text2.Text)
    temp = n1
    n1 = n2
    n2 = temp
    lblOutput.Caption = "First Number is " & n1 & vbCrLf & "Second Number is " & n2
End Sub

Code Window

Output View

Design View



HOW TO CALCULATE PERCENTAGE USING VB PROGRAMMING.

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


  • To Make An Calculator 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 Percentages. 
  • In this Example I used default names of Control.  

Coding of Percentages

Private Sub cmdClick_Click()
Dim obt As Integer, tol As Integer
Dim per As Double
obt = Val(txtOtd.Text)
tol = Val(txtTol.Text)
per = obt * 100 / tol
Label3.Caption = "Percentage are " & per
End Sub
  

Code Window

Output View

Design View

Saturday, August 31, 2019

C Language Program for Find largest From Three Number.


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



Here you will get simple C program 
C Language Program for Find The Largest From Three No’s..
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input three numbers and
then their Largest number will be calculated and
finally it will be printed on screen.

The program coding is given below.
#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b,c;
 clrscr();
 printf("Enter Any Three Value's = ");
 scanf("%d %d %d",&a,&b,&c);
 if((a>b)&&(a>c))
 {
  printf("A is Largest Number");
 }
 if (b>c)
 {
  printf("B is Largest Number");
 }
 else
 {
  printf("C is Largest Number");
 }
 getch();
}
Output will be given after you compile it.