Bsc3rd Year Practical File (CS)
Bsc3rd Year Practical File (CS)
DBMS
Output:-
Output :-
Output:-
Syntax :-
Output :-
Output:-
(5) Select list of all teachers whose name starts from ‘S’.
Syntax:-
Output:-
Syntax:-
Output:-
Syntax:-
Output:-
Syntax:-
DELETE FROM StuINFO WHERE Sname = 'Raj Goyal';
Output:-
Syntax:-
Output:-
Syntax:-
ROLLBACK
Output:-
Syntax:-
For Entries:-
Output:-
Syntax:-
For Entries:-
Output:-
Syntax:-
Output:-
VISUAL BASIC
Layout:
CODING:-
Dim A, B, c As Integer
A = Val(Text1.Text)
B = Val(Text2.Text)
c=A+B
Text3.Text = c
End Sub
A = Val(Text1.Text)
B = Val(Text2.Text)
c=A-B
Text3.Text = c
End Sub
A = Val(Text1.Text)
B = Val(Text2.Text)
c=A*B
Text3.Text = c
End Sub
A = Val(Text1.Text)
B = Val(Text2.Text)
c=A/B
Text3.Text = c
End Sub
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
End
End Sub
End Sub
OUTPUT:
ADDITION SUBTRACTION
MULTIPLICATION DIVISION
Layout:
CODING:
Dim p, r, t As Integer
p = Val(Text1.Text)
r = Val(Text2.Text)
t = Val(Text3.Text)
si = p * r * t / 100
Text4.Text = si
ci = (p + (1 + r) ^ t) / 100
Text5.Text = ci
End Sub
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
End Sub
OUTPUT
CODING:
Dim a As Integer
Dim b As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
temp = b
b=a
a = temp
Text1.Text = a
Text2.Text = b
End Sub
OUTPUT
Layout:
CODING:
Dim A, n, r As Integer
n = Val(Text1.Text)
For A = 2 To n - 1 Step 1
r = n Mod A
If r = 0 Then
Exit For
End If
Next
If r <> 0 Then
End If
End Sub
Text1.Text = ""
End Sub
End Sub
OUTPUT:
CODING;
Private Sub Command1_Click()
MsgBox "The Time is "& Time
End Sub
OUTPUT:
CODING:
Private Sub Command1_Click()
Combo1.AddItem Text1.Text
End Sub
List1.AddItem Text1.Text
End Sub
Dim A As Integer
A = Combo1.ListIndex
If A >= 0 Then
Combo1.RemoveItem Combo1.ListIndex
End If
End Sub
Dim B As Integer
B = List1.ListIndex
If B >= 0 Then
List1.RemoveItem List1.ListIndex
End If
End Sub
List1.Clear
End Sub
End Sub
Combo1.Clear
End Sub
End
End Sub
End Sub
OUTPUT:
CODING:
Private Sub Command1_Click()
Dim s1 As Integer, s2 As Integer, s3 As Integer, s4, s5 As Integer
Dim sum, prac, total, per As Long
s1 = Val(Text7.Text)
s2 = Val(Text8.Text)
s3 = Val(Text9.Text)
s4 = Val(Text10.Text)
s5 = Val(Text11.Text)
S6 = Val(Text12.Text)
S7 = Val(Text13.Text)
S8 = Val(Text14.Text)
S9 = Val(Text15.Text)
S10 = Val(Text16.Text)
sum = s1 + s2 + s3 + s4 + s5
Label52 = sum
Label54 = s1 + S6
Label55 = s2 + S7
Label56 = s3 + S8
Label57 = s4 + S9
Label58 = s5 + S1
prac = S6 + S7 + S8 + S9 + S10 + s11
Label53 = prac
total = s1 + s2 + s3 + s4 + s5 + S6 + S7 + S8 + S9 + S10
Label48.Caption = total
per = total / 5
Label49.Caption = per
sum = s1 + s2 + s3 + s4 + s5
Label52.Caption = sum
Label54 = s1 + S6
Label55 = s2 + S7
Label56 = s3 + S8
Label57 = s4 + S9
Label58 = s5 + S10
S10 = Val(Text16.Text)
sum = s1 + s2 + s3 + s4 + s5
total = s1 + s2 + s3 + s4 + s5 + S6 + S7 + S8 + S9 + S10
Label48.Caption = total
per = total / 5
Label49.Caption = per
If per >= 33 And per < 60 Then
Label64.Caption = "second division"
ElseIf per >= 60 Then
Label64.Caption = "first divisions"
End If
End Sub
OUTPUT:
CODING:
Private Sub Form_Load()
End Sub
End Sub
OUTPUT:
Layout:
CODING:
If Check1.Value = 1 Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
End Sub
If Check2.Value = 1 Then
Text1.FontItalic = True
Else
Text1.FontItalic = False
End If
End Sub
If Check3.Value = 1 Then
Text1.FontUnderline = True
Else
Text1.FontUnderline = False
End If
End Sub
If Check4.Value = 1 Then
Text1.FontSize = 18
Else
Text1.FontSize = 16
End If
End Sub
If Check5.Value = 1 Then
Text1.FontSize = 14
Else
Text1.FontSize = 16
End If
End Sub
If Check6.Value = 1 Then
Text1.ForeColor = vbBlue
Else
Text1.ForeColor = vdred
End If
End Sub
End Sub
OUTPUT:
CODING:
Private Sub Command1_Click()
Timer1.Interval = 200
End Sub
Rocket Launcher
box)using scrollbox.
Layout:
CODING:
End Sub
End Sub
End Sub
End Sub
OUTPUT:
Layout:
CODING:
Dim A(10) As Integer
Dim I As Integer
Dim flAs Integer
Dim srch As Integer
Dim psAs Integer
Private Sub Command1_Click()
For I = 1 To 5 Step 1
A(I) = Val(InputBox("Enter the elements of Array", "INPUT"))
Next I
End Sub
CODING:
Dim X As Integer
Dim Y As Integer
Dim TEMP As Integer
TEMP = A
A=B
B = TEMP
Text5.Text = A
Text6.Text = B
End Function
OUTPUT:
Layout:
CODING:
Dim n As Integer
n = Val(Text1.Text)
s = factorial(n)
Text2.Text = s
End Sub
CODING:
Dim word As String
Dim rev As String
Private Sub Command1_Click()
word = InputBox("Enter a Word")
rev = StrReverse(word)
If StrComp(word, rev) = 0 Then
MsgBox "palindrome"
Else
MsgBox "not a palindrome"""
End If
End Sub
OUTPUT:
CODING:
Dim A As Integer
Dim B As Integer
Dim c As Integer
Private Sub Command1_Click()
A = Val(Text1.Text)
B = Val(Text2.Text)
c = Val(Text3.Text)
Call comp
End Sub
Sub comp()
OUTPUT:
Layout:
CODING:
Private Sub Command1_Click()
Dim A As Integer
Dim B As Integer
Dim n As Integer
n = Val(Text1.Text)
A=0
B=1
Print A;
Print B;
Call pfibo(A, B, n)
End Sub
Dim B As Integer
Dim n As Integer
Dim s As Integer
Dim c As Integer
n = Val(Text1.Text)
A=0
B=1
s = sfibo(A, B, n, c)
Text2.Text = s
End Sub
Private Function pfibo(A%, B%, n%)
Dim c%
If (n > 0) Then
c=A+B
If (n >= 3) Then
Print c;
End If
A=B
B=c
Call pfibo(A, B, n - 1)
End If
End Function
OUTPUT:
CODING:
Private Sub Command1_Click()
Text3.Text = name
Text4.Text = rno
Close #1
End Sub
Private Sub Command3_Click()
End
End Sub
OUTPUT:
Layout:-
Dim n As Integer
n = Val(Textbox1.Text)
For i = 1 To 10 Step 1
Next
End Sub
OUTPUT:
Layout:
CODING:
Dim a, b, c As Integer
If a = 1 Then
Text1.Text = b + c
ElseIf a = 2 Then
Text1.Text = b - c
ElseIf a = 3 Then
Text1.Text = b * c
ElseIf a = 4 Then
Text1.Text = b / c
ElseIf a = 5 Then
Text1.Text = b Mod c
ElseIf a = 6 Then
Text1.Text = b ^ 0.5
Else
Text1.Text = 0
End If
End Sub
End Sub
End Sub
a=6
b = Text1.Text
Text1.Text = ""
End Sub
OUTPUT:
Addition of 11+6=