Sunday, October 6, 2019

HOW TO CREATE PATTERNS USING VB PROGRAMMING.

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


  • To Create Pattern you need to insert One 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.
  • For Output or Display of Pattern in Form we use an Print Statement. 
  • In this Example I used default names of Control. 
The Pattern is Look's Like
ABCDE
ABCDE
ABCDE
ABCDE
ABCDE

Coding of Pattern

Private Sub cmdClick_Click()
Dim n, a As Integer
n = Val(Text1.Text)
For i = 1 To n
    a = 65
    For j = 1 To n
        Print Chr(a);
        a = a + 1
    Next j
    Print
Next i
End Sub
Code Window

Design View

Output View

HOW TO CREATE PATTERNS USING VB PROGRAMMING.

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


  • To Create Pattern you need to insert One 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.
  • For Output or Display of Pattern in Form we use an Print Statement. 
  • In this Example I used default names of Control. 
The Pattern is Look's Like
A
AB
ABC
ABCD
ABCDE

Coding of Pattern

Private Sub cmdClick_Click()
Dim n, a As Integer
n = Val(Text1.Text)
For i = 1 To n
    a = 65
    For j = 1 To i
        Print Chr(a);
        a = a + 1
    Next j
    Print
Next i
End Sub
Code Window

Design View

Output View

Thursday, October 3, 2019

HOW TO CREATE PATTERNS USING VB PROGRAMMING.

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


  • To Create Pattern you need to insert One 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.
  • For Output or Display of Pattern in Form we use an Print Statement. 
  • In this Example I used default names of Control. 
The Pattern is Look's Like
11111
22222
33333
44444
55555

Coding of Pattern

Private Sub cmdClick_Click()
Dim n As Integer, i As Integer
n = Val(Text1.Text)
For i = 1 To n
    For j = 1 To n
        Print i;
    Next j
    Print
Next i
End Sub


Code Window

Design View

Output View

HOW TO CREATE PATTERNS USING VB PROGRAMMING.

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


  • To Create Pattern you need to insert One 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.
  • For Output or Display of Pattern in Form we use an Print Statement. 
  • In this Example I used default names of Control. 
The Pattern is Look's Like
1
22
333
4444
55555

Coding of Pattern

Private Sub cmdClick_Click()
Dim n As Integer, i As Integer
n = Val(Text1.Text)
For i = 1 To n
    For j = 1 To i
        Print i;
    Next j
    Print
Next i
End Sub
Code Window

Design View

Output View

Tuesday, September 24, 2019

C++ Language Program for Subtraction of n Numbers.


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

C++ Language Program for Subtraction 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 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 n, sub;
public:
void getdata()
{
cout << "Enter a positive integer: ";
    cin >> n;
}
void display()
{
sub=0;
for (int i = 1; i <= n; ++i)
{
        sub -= i;
    }
    cout << "Subtraction = " << sub;
}
};
void main()
{
clrscr();
SUB s1;
s1.getdata();
s1.display();
getch();
}

Output will be given after you compile it.