Sei sulla pagina 1di 34

1

HTML PROGRAM
<html>
<head>
MY WEBPAGE DISPLAYING NAME AND ADDRESS
</title>
<body>
<body bgcolor=red>
<marquee> WELCOME TO MY WEBPAGE</marquee>
<body background = C:\Documents and Settings\All Users\Documents\My Pictures\Sample
Pictures\Sunset.jpg>
</h1>
<u>WELCOME</u><br>
<font face = comic sans ms size = 8 Color = blue > Name- SAMBIT DASH<br>
</h1>
</h2>
<u> Address</U>
BARGARH,
ODISHA
<BR>
</H2>
</HTML>





2


A program to check whether a number is Armstrong or not.


Program Code:-

Private Sub Command1_Click ( )
Dim No, Am, R, Sum As Integer
No = Val (Text1.Text)
Am = No
Sum = 0
While No > 0
R = No Mod 10
Sum = Sum + (R * R * R)
No = No \ 10
Wend
If Am = Sum Then
Text2.Text = ARMSTRONG
Else
Text2.Text = NOT ARMSTRONG
End If
3

End Sub

Private Sub Command2_Click ( )
Unload Me
End Sub

Output:-





4

A Program to check whether a number is even or odd.


Program Code:-

Private Sub Command1_Click ( )
Dim X As Integer
X = Val (Text1.Text)
If X Mod 2 = 0 Then
Text2.Text = Even
Else
Text2.Text = Odd
End If
End Sub
Private Sub Command2_Click ( )
Unload Me
End Sub








5




Output:-

















6



A program to check whether a number is Palindrome or not.


Program Code:-
Private Sub Command1_Click ( )
Dim No ,Rev, R, X As Integer
No = Val (Text1.Text)
Rev = 0
X = No
While No > 0
R = no Mod 10
No = No \ 10
Rev = (Rev * 10) + R
Wend
If Rev = X Then
Text2.Text = PALLINDROME
Else
7

Text2.Text = NOT PALLINDROME
End if
End Sub

Private Sub Command2_Click ( )
Unload Me
End Sub

Output:-








8

A Program for division of mark.


Program Code:-
Private Sub Command1_Click ()
Dim Mark As Integer
Mark = Val (Text1.Text)
If Mark >= 80 Then
Label2.Caption = Merit Position
Else If Mark >= 60 Then
Label2.Caption = First Division
Else If Mark >= 50 Then
Label2.Caption = Second Division
Else If Mark >= 40 Then
Label2.Caption = Third Division
Else
Label2.Caption = Fail
End If
End If
End If
9

End If
End Sub
Private Sub Command2_Cliclk ()
Unload Me
End Sub

Output:-







10




A program to check whether a year is a leap year or not.




Program Code :-

Private Sub Command1_ Click ( )
Dim Y AS Integer
Y = Val (Text1.Text)
If ( (Y Mod 4 = 0) and (Y Mod 100 < > 0) Or (Y Mod 400 = 0) ) Then
Text2.Text = LEAP YEAR
Else
Text2.Text = NOT A LEAP YEAR
END If
End Sub
11

Private Sub Command2_Click ( )
Unload Me
End Sub

Output:-










12

A Program to display Fibonacci series.



Program Code:-

Private Sub Command1_Click ()
Dim a As Integer
Dim i As Integer
Dim b As Integer
Dim c As Integer
Dim n As Integer
n = Val (Text1.Text)
a = 0
b = 1
i = 1
Print The Fibonacci series is:
Print a; b;
Do While (i <= n)
c = a + b
13

Print c;
a = b
b = c
I = I + 1
Loop
End Sub
Private Sub Command2_Click ()
Unload Me
End Sub

Output:-








14


A Program to find out factorial of a number.


Private Sub Command1_Click ()
Dim X, F As Integer
X=Val (Text1.text)
F = 1
While (X > 1)
F = F * X
X = X 1
Wend
Text2.Text = F
End Sub
Private Sub Command2_Click ()
Unload Me
End Sub
15

Output:-


















16

A Program to find out reverse of a number.



Program Code:-
Private Sub Command1_Click ()
Dim X, Z, P As Integer
Z=0
X = Val (Text1.Text)
While (X > 0)
P = X Mod 10
Z = (Z * 10) + P
X = X \ 10
Wend
Text2.Text = Z
End Sub
Private Sub Command2_Click ()
Unload Me
End Sub


17

Output:-






18


A program to find the sum and average of a number.



Program Code:-
Private Sub Command1_Click ( )
Dim A, B, Sum As Integer
Dim Avg As Single
A = Val (Text1.Text)
B = Val (Text2.Text)
Sum = A+ B
Text3.Text = Sum
Avg = Sum \ 2
Text4.Text = Avg
End Sub

19

Private Sub Command2_Click ( )
Unload Me
End Sub


Output:-












20


A Program to interchange two numbers.




Program Code:-

Private Sub Command1_Click ()
X = Val (Text1.Text)
Y = Val (Text2.Text)
X = X + Y
Y = X - Y
X = X Y
Text1.Text = X
Text2.Text = Y
End Sub


21

Private Sub Command2_Click ()
Unload Me
End Sub


Output:-


22


Create a table (MDB) using MS-Access :-
Applies to: Microsoft Office Access 2003
Show All
Create a table by using the Table Wizard
1. Press F11 to switch to the Database window (Database window: The window that appears when you open an
Access database or an Access project. It displays shortcuts for creating new database objects and opening
existing objects.).
2. Click Tables under Objects, and then click New on the Database window toolbar.
3. Double-click Table Wizard.
If the wizard doesn't start
4. Follow the directions in the Table Wizard dialog boxes.
(Design view: A window that shows the design of these database objects: tables, queries, forms, reports, macros,
and data access pages. In Design view, you can create new database objects and modify the design of existing
ones.) Create a table in Design view
1. Press F11 to switch to the Database window (Database window: The window that appears when you open an
Access database or an Access project. It displays shortcuts for creating new database objects and opening
existing objects.).
2. Click Tables under Objects, and then click New on the Database window toolbar.
3. Double-click Design View.
4. Define each of the fields in your table.
a. Open the table in Design view (Design view: A window that shows the design of these database
objects: tables, queries, forms, reports, macros, and data access pages. In Design view, you can
create new database objects and modify the design of existing ones.).
b. To insert the field within the table, click in the row below where you want to add the field, and then
click Insert Rows on the toolbar.
To add the field to the end of the table, click in the first blank row.
c. Click in the Field Name column and type a unique name for the field.
d. In the Data Type column, keep the default (Text); or click in the Data Type column, click the arrow,
and select the data type (data type: The characteristic of a field that determines what type of data it
can hold. Data types include Boolean, Integer, Long, Currency, Single, Double, Date, String, and
Variant (default).) you want.
e. In the Description column, type a description of the information this field will contain. This
description is displayed on the status bar (status bar: A horizontal bar at the bottom of the screen
that displays information about the current condition of the program, such as the status of items in
the window, the progress of the current task, or information about the selected item.) when adding
data to the field and is included in the Object Definition of the table. The description is optional.
5. Define a primary key (primary key: One or more fields (columns) whose values uniquely identify each record in
a table. A primary key cannot allow Null values and must always have a unique index. A primary key is used to
relate a table to foreign keys in other tables.) field before saving your table.
a. Open a table in Design view (Design view: A window that shows the design of these
database objects: tables, queries, forms, reports, macros, and data access pages. In Design
view, you can create new database objects and modify the design of existing ones.).
b. Select the field or fields you want to define as the primary key (primary key: One or more
fields (columns) whose values uniquely identify each record in a table. A primary key cannot
allow Null values and must always have a unique index. A primary key is used to relate a
table to foreign keys in other tables.).
23

To select one field, click the row selector (row selector: A small box or bar that, when clicked,
selects an entire row in table or macro Design view, or when you sort and group records in
report Design view.) for the desired field.
To select multiple fields, hold down the CTRL key and then click the row selector for each
field.
c. Click Primary Key on the toolbar.
NOTE If you want the order of the fields in a multiple-field primary key to be different from the order of those
fields in the table, click Indexes on the toolbar to display the Indexes window (Indexes window: In an
Access database, a window in which you can view or edit a table's indexes or create multiple-field indexes.),
and then reorder the field names for the index (index: A feature that speeds up searching and sorting in a table
based on key values and can enforce uniqueness on the rows in a table. The primary key of a table is
automatically indexed. Some fields can't be indexed because of their data type.) named PrimaryKey.
NOTE You don't have to define a primary key, but it's usually a good idea. If you don't define a primary key,
Microsoft Access asks if you want Access to create one for you when you save the table.
6. When you are ready to save your table, click Save on the toolbar, and then type a unique name for the
table.
Create a table by entering data in a datasheet
1. Press F11 to switch to the Database window (Database window: The window that appears when you open an
Access database or an Access project. It displays shortcuts for creating new database objects and opening
existing objects.).
2. Click Tables under Objects, and then click New on the Database window toolbar.
3. Double-click Datasheet View. A blank datasheet is displayed. The default column names are Field1, Field2,
and so on.
4. Rename each column you will use: double-click the column name, type a name for the column, and then press
ENTER.
5. You can insert additional columns at any time: click in the column to the right of where you want to insert a new
column, and then on the Insert menu, click Column. Rename the column as described in step 4.
6. Enter your data in the datasheet.
Enter each kind of data in its own column (each column is called a field (field: An element of a table that
contains a specific item of information, such as a last name. A Title field might contain Mr. or Ms. Databases
such as Microsoft SQL Server refer to fields as columns.) in Microsoft Access). For example, if you are entering
names, enter the first name in its own column and the last name in a separate column. If you are entering
dates, times, or numbers, enter them in a consistent format so that Microsoft Access can create an appropriate
data type (data type: The characteristic of a field that determines what type of data it can hold. Data types
include Boolean, Integer, Long, Currency, Single, Double, Date, String, and Variant (default).) and display
format (format: Specifies how data is displayed and printed. An Access database provides standard formats for
specific data types, as does an Access project for the equivalent SQL data types. You can also create custom
formats.) for the column. Any columns you leave empty will be deleted when you save the datasheet.
7. When you've added data to all the columns you want to use, click Save on the toolbar to save your
datasheet.
8. Microsoft Access asks you if you want to create a primary key (primary key: One or more fields (columns)
whose values uniquely identify each record in a table. A primary key cannot allow Null values and must always
have a unique index. A primary key is used to relate a table to foreign keys in other tables.). If you haven't
entered data that can be used to uniquely identify each row in your table, such as part numbers or ID numbers,
it's recommended that you click Yes. If you have entered data that can uniquely identify each row, click No,
and then specify the field that contains that data as your primary key in Design view (Design view: A window
that shows the design of these database objects: tables, queries, forms, reports, macros, and data access
pages. In Design view, you can create new database objects and modify the design of existing ones.).

1. Open a table in Design view (Design view: A window that shows the design of these database objects:
tables, queries, forms, reports, macros, and data access pages. In Design view, you can create new
database objects and modify the design of existing ones.).
24

2. Select the field or fields you want to define as the primary key (primary key: One or more fields
(columns) whose values uniquely identify each record in a table. A primary key cannot allow Null values
and must always have a unique index. A primary key is used to relate a table to foreign keys in other
tables.).
To select one field, click the row selector (row selector: A small box or bar that, when clicked, selects an
entire row in table or macro Design view, or when you sort and group records in report Design view.) for
the desired field.
To select multiple fields, hold down the CTRL key and then click the row selector for each field.
3. Click Primary Key on the toolbar.
NOTE If you want the order of the fields in a multiple-field primary key to be different from the order of those
fields in the table, click Indexes on the toolbar to display the Indexes window (Indexes window: In an
Access database, a window in which you can view or edit a table's indexes or create multiple-field indexes.),
and then reorder the field names for the index (index: A feature that speeds up searching and sorting in a table
based on key values and can enforce uniqueness on the rows in a table. The primary key of a table is
automatically indexed. Some fields can't be indexed because of their data type.) named PrimaryKey.
(validation rule: A property that defines valid input values for a field or record in a table, or a control on a form.
Create a table by using the Table Wizard
1. Press F11 to switch to the Database window (Database window: The window that appears when you open an
Access database or an Access project. It displays shortcuts for creating new database objects and opening
existing objects.).
2. Click Tables under Objects, and then click New on the Database window
Access displays the message specified in the ValidationText property when the rule is violated.)


25

THE STEPS OF USING INTERNET THROUGH DIAL-UP CONNECTION.PROCEDURE FOR
DIAL UP INTERNET CONNECTION IN YOUR DESKTOP/LAPTOP

Step 1
Double click on My Network Connections/ Places










26

Step 2
Click on View Network Connections













27

Step 3
Click on Create New Connection







28

Step 4
Click on Next








29

Step 5

Select 1
st
option i.e. Connect to Internet and click next






30

Step 6
Select Dial-Up Connection and click Next






31

Step 7

Write company name as BSNL and click next







32

Step 8
Enter phone no. 172222 and click next





33

Step 9
Check on add a short cut to this connection to my desktop and click finish






34

STEP 10 :
Now from your Short at DESKTOP , double Click on the Shortcut and Dial ID and Password as
mentioned below ..
D: STDCODE (without ZERO) followed by Phone Number
(As for Patna users with Phone number 2345678 ; ID will be : 6122345678)
PASSWORD : bsnl10

Potrebbero piacerti anche