26461621ii Puc Computer Science Lab Manual
26461621ii Puc Computer Science Lab Manual
CONTENTS
Program Page
Program Name
No No
SECTION- A (C++ AND DATA STRUCTURES)
01 Write a C++ program to find the frequency presence of an element in an array. 06
02 Write a C++ program to insert an element into an array at a given position. 08
03 Write a C++ program to delete an element from an array from a given position. 10
Write a C++ program to sort the element of an array in ascending order using
04 12
insertion sort.
Write a C++ program to search for a given element in an array using binary search
05 14
method.
Write a C++ program to create a class with data members principal, time and rate.
06 Create a member function to accept data values, to compute simple interest and to 16
display the result.
Write a C++ program to create a class with data members a, b, c and member
functions to input data, compute the discriminates based on the following conditions
and print the roots.
07 18
➢ If discriminates = 0, print the roots are equal and their value.
➢ If discriminates > 0, print the real roots and their values.
➢ If discriminates < 0, print the roots are imaginary and exit the program.
Write a C++ program to find the area of square/ rectangle/ triangle using function
08 20
overloading.
10 23
constructors.
Create a base class containing the data member roll number and name. Also create a
member function to read and display the data using the concept of single level
11 25
inheritance. Create a derived class that contains marks of two subjects and total marks
as the data members.
Create a class containing the following data members Register No, Name and Fees.
Also create a member function to read and display the data using the concept of
12 pointers to objects. 27
13 Write a C++ program to perform push items into the stack. 29
14 Write a C++ program to perform pop items into the stack. 32
15 Write a C++ program to perform Enqueue and Dequeue. 35
16 Write a program to create a linked List and appending nodes 38
1
Program Page
Program Name
No No
SECTION – B (SQL)
Generate the electricity bill for one customer
Create a table for house hold Electricity bill with the following fields.
Field Name Type
RR_NO VARCHAR(3)
CUS_NAME VARCHAR(35)
DATE_BILLING DATE
UNITS NUMBERIC(6,2)
1. Add records into the table for 10 students for Student ID, Student Name and
02 marks in 6 subjects using INSERT command. 44
2. Display the description of the fields in the table using DESC command.
3. Alter the table and calculate TOTAL and PERC_MARKS.
4. Compute the RESULT as “PASS” or “FAIL” by checking if the student has
scored more than 35 marks in each subject.
5. List the contents of the table.
6. Retrieve all the records of the table.
7. Retrieve only ID_NO and S_NAME of all the students.
8. List the students who have result as “PASS”.
9. List the students who have result as “FAIL”.
10. Count the number of students who have passed.
11. Count the number of students who have failed.
12. List the students who have percentage greater than 60.
13. Sort the table according to the order of ID_NO.
2
Generate the Employee details and compute the salary based on the department.
Create the following table EMPLOYEE
Field Name Type
EMP_ID INT
DEPT_ID INT
EMP_NAME VARCHAR(10)
EMP_SALARY FLOAT
3
Create database for the Bank transaction
SECTION- C HTML
4
SECTION – A
C++ AND DATA STRUCTURES
5
PROGRAM 1:
class Frequency
{
private:
int m[10], n, ele, freq; //Data member
public:
void getdata( );
void findfreq( ); //Member functions declaration
void display( );
};
6
OUTPUT 1:
OUTPUT 2:
7
PROGRAM 2:
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
#include <process.h>
class Insertion
{
private:
int m[10], n, p, ele; //Data Members
public:
void getdata( );
void insert( ); // Member Function Declaration
void display( );
};
void Insertion::getdata( )
{
cout<<"Enter the size of the array"<<endl;
cin>>n;
cout<<"Enter the elements for the array"<<endl;
for(int i=0; i<n; i++)
cin>>m[i];
cout<<"Enter the element to be inserted"<<endl;
cin>>ele;
cout<<"Enter the position of the element in the array"<<endl;
cin>>p;
}
void Insertion::insert( )
{
if(p>n)
{
cout<<p<<" is an invalid position";
getch( );
exit(0);
}
void Insertion::display( )
{
cout<<"Array elements after insertion are:"<<endl;
for(int i=0; i<n; i++)
cout<<setw(4)<<m[i];
}
8
void main( )
{
Insertion I;
clrscr( );
I.getdata( );
I.insert( );
I.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
9
PROGRAM 3:
Write a C++ program to delete an element from an array from a given position.
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
#include <process.h>
class deletion
{
private:
int m[10], n, p;
public:
void getdata( );
void remove( );
void display( );
};
void deletion::getdata( )
{
cout<<"Enter the size of the array"<<endl;
cin>>n;
cout<<"Enter the elements for the array:"<<endl;
for (int i=0; i<n; i++)
cin>>m[i];
cout<<"Enter the position to an delete an element:\n";
cin>>p;
}
void deletion::remove( )
{
if(p>n-1)
{
cout<<p<< “ is an invalid position “;
getch( );
exit(0);
}
ele=m[p];
for(int i=p+1; i<n; i++)
m[i-1] = m[i];
n = n-1; // Reduce size of the array by 1
cout<< ele << “ is successfully removed “;
}
void deletion::display( )
{
cout<<"After deletion the array elements are"<<endl;
for(int i=0; i<n; i++)
cout<<setw(4)<<m[i];
}
10
void main( )
{
deletion D;
clrscr();
D.getdata( );
D.remove( );
D.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
11
PROGRAM 4:
Write a C++ program to sort the element of an array in ascending order using insertion sort.
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
class sorting
{
private:
int m[10], n;
public:
void getdata( );
void sort( );
void display( );
};
void sorting::getdata( )
{
cout<<"Enter the size of the array:"<<endl;
cin>>n;
cout<<"Enter the elements for the array:"<<endl;
for(int i=0; i<n; i++)
cin>>m[i];
}
void sort::display( )
{
cout <<” The array after sorting is “;
for(int i=0; i<n; i++)
cout<<setw(4)<<m[i];
}
void sorting::sort( )
{
int j, temp;
for(int i=1; i<n; i++)
{
j = i;
while(j >= 1)
{
if(m[j] < m[j-1])
{
temp = m[j];
m[j] = m[j-1];
m[j-1] = temp;
}
j = j-1;
}
}
}
12
void main( )
{
sorting S;
clrscr();
S.getdata( );
S.sort( );
S.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
13
PROGRAM 5:
Write a C++ program to search for a given element in an array using binary search method.
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
class binarysearch
{
private:
int m[10], n, ele, loc ;
public:
void getdata( );
void search( );
void display( );
};
void binarysearch::getdata( )
{
cout<<"Enter the size of the array:"<<endl;
cin>>n;
cout<<"Enter the array elements in sorted order:"<<endl;
for(int i=0;i<n;i++)
cin>>m[i];
cout<<"Enter the element to search:"<<endl;
cin>>ele;
}
void binarysearch::display( )
{
if(loc >=0)
cout<<ele" Found at location = "<<loc;
else
cout<< ele " Element does not exist “;
}
void binarysearch::search( )
{
loc = -1; // Assume that element does not exist
beg = 0; // First element of the array
end = n-1;
while (beg<=end)
{
mid = (beg+end)/2;
if (ele = = m[mid]) // Element found at mid
{
loc = mid;
break;
}
else
if (ele < m[mid])
end = mid-1;
else
beg = mid+1;
14
}
}
void main( )
{
binarysearch B;
clrscr( );
B.getdata( );
B.search( );
B.display( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
15
PROGRAM 6:
Write a C++ program to create a class with data members principal, time and rate. Create a member
function to accept data values, to compute simple interest and to display the result.
#include<iostream.h>
#include<conio.h>
class interest
{
private:
double p,r,t,si; //Data Members
public:
void getdata( );
void compute( ); //Member Functions Declaration
void putdata( );
};
void main( )
{
interest I;
clrscr( );
I.getdata( );
I.compute( );
I.putdata( );
getch( );
}
16
OUTPUT 1:
OUTPUT 2:
17
PROGRAM 7:
Write a C++ program to create a class with data members a, b, c and member functions to input data,
compute the discriminant based on the following conditions and print the roots.
➢ If discriminant = 0, print the roots are equal and their value.
➢ If discriminant > 0, print the real roots and their values.
➢ If discriminant < 0, print the roots are imaginary and exit the program.
#include<iostream.h>
#include<conio.h>
#include<math.h>
#include <process.h>
class quadratic
{
private:
double a, b, c,r1,r2;
public:
void getdata( );
void roots( );
void putdata( );
};
void quadratic::getdata( )
{
cout<<"Enter the values for a, b, c (Co-efficient)"<<endl;
cin>>a>>b>>c;
}
void quadratic::roots( )
{
double d = b*b-4*a*c;
if (d = = 0)
{
cout<<"Equal Roots..."<<endl;
r1= -b/(2*a);
r2=r1;
}
else if(d>0)
{
cout<<"Real and Distinct Roots..."<<endl;
r1=(-b+sqrt(d))/(2*a);
r2=(-b-sqrt(d))/(2*a);
}
else
{
cout<<"Imaginary Roots..."<<endl;
getch();
exit(0);
}
18
void quadratic::putdata( )
{
cout<<"Root 1 is "<<r1<<endl;
cout<<"Root 2 is "<<r2<<endl;
}
void main( )
{
quadratic Q;
clrscr( );
Q.getdata( );
Q.roots( );
Q.putdata();
getch( );
}
OUTPUT 1:
OUTPUT 2:
OUTPUT 3:
19
PROGRAM 8:
Write a C++ program to find the area of square/ rectangle/ triangle using function overloading.
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
#include<math.h>
class Funcoverload
{
float s;
public:
float area(float a) //To compute area of square
{
return a*a;
}
void main()
{
float x,y,z;
int ans;
Funcoverload F;
clrscr( );
if (ans= = 1)
{
cout<<"Enter the side "<<endl;
cin>>x;
cout<<"Area of Square= "<<F.area(x)<<endl;
}
else if (ans= = 2)
{
cout<<"Enter the two sides "<<endl;
cin>>x>>y;
cout<<"Area of Rectangle= "<<F.area(x,y)<<endl;
}
20
else if (ans = = 3)
{
cout<<"Enter the three sides"<<endl;
cin>>x>>y>>z;
cout<<"Area of Triangle= "<<F.area(x,y,z)<<endl;
}
else
cout<<"Invalid input !!!"<<endl;
getch( );
}
OUTPUT 1:
OUTPUT 2
OUTPUT 3
21
PROGRAM 9:
#include<iostream.h>
#include<conio.h>
class assign
{
private:
int n;
public:
assign (int nn) // parameterized constructor with only one parameter
{
n=nn;
}
int cube();
};
inline int assign :: cube()
{
return (n*n*n);
}
OUTPUT 1:
OUTPUT 2:
22
PROGRAM 10:
Write a C++ program to find sum of the series 1 + x + x2 + x3 + ….xn using constructors.
#include<iostream.h>
#include<conio.h>
class Series
{
private:
int bas,power,term,sum;
public:
Series(int b,int p); //Parameterized constructor
float calculate();
};
Series::Series(int b,int p)
{
bas=b;
power=p;
}
float Series::calculate()
{
sum=1;
term=bas;
for(int i=1;i<=power;i++)
{
sum=sum+term;
term=term*bas;
}
return sum;
}
void main()
{
clrscr();
int b,p;
getch();
23
OUTPUT 1:
OUTPUT 2:
24
PROGRAM 11:
Create a base class containing the data member roll number and name. Also create a member function to
read and display the data using the concept of single level inheritance. Create a derived class that
contains marks of two subjects and total marks as the data members.
#include<iostream.h>
#include<conio.h>
void display( )
{
cout<<"\nRoll Number :"<<rollno<<endl;
cout<<"Student Name:"<<name<<endl;
}
};
25
void main( )
{
marks obj; // Create an object obj to process Student data
clrscr( );
obi.read( );
obj.read1( );
obj.display( );
obj.display1( );
getch( );
}
OUTPUT 1:
OUTPUT 2:
26
PROGRAM 12:
Create a class containing the following data members Register_No, Name and Fees. Also create a
member function to read and display the data using the concept of pointers to objects.
#include<iostream.h>
#include<conio.h>
class student
{
private:
long regno;
char name[20];
float fees;
public:
void get( );
void display( );
};
void student::get( )
{
cout<<"Enter the Register Number:"<<endl;
cin>>regno;
cout<<"Enter the Student Name:"<<endl;
cin.getline(name,20);
cout<<"Enter the Fees:"<<endl;
cin>>fees;
}
void student::display( )
{
cout<<"Register Number : "<<regno<<endl;
cout<<"Student Name : "<<name<<endl;
cout<<"Fees : "<<fees<<endl;
}
void main( )
{
Student s,*sp; // Create a pointer to point Student object
clrscr( );
sp=&s;
sp->get( ); // Access Student data member using a pointer
sp->display( ); // Display data using a pointer
getch( );
}
OUTPUT 1:
27
OUTPUT 2:
28
PROGRAM 13:
#include<iostream.h>
#include<conio.h>
#include<process.h>
#include<iomanip.h>
#define MAX 3
class Stack
{
private:
int A[MAX], top;
public:
Stack( ) // Constructor to initialize TOP pointer
{
top = -1;
}
void Push(int item); // Member Function Declaration
void print( );
};
top++;
A[top]=item;
cout<<item<<" is successfully pushed " <<endl;
}
void Stack::print( )
{
if(top != -1)
{
cout<<"The Stack elements are:"<<endl;
for(int i=0; i<=top; i++)
cout<<setw(4)<<A[i];
cout<<endl;
}
else
cout<<"Empty Stack!!!"<<endl;
}
void main( )
{
Stack S;
29
int choice, itm;
clrscr( );
while(1)
{
cout<<"Stack Push Operation Menu"<<endl;
cout<<"1. PUSH"<<endl;
cout<<"2. DISPLAY"<<endl;
cout<<"3. EXIT"<<endl;
switch(choice)
{
case 1: {
cout<<"Push Operation"<<endl;
cout<<"Enter the value of element:"<<endl;
cin>>itm;
S.Push(itm); break;
}
case 2: {
S.print( );
break;
}
case 3: {
cout<<"End of Stack Operation"<<endl;
getch( );
exit(0);
}
30
OUTPUT:
31
PROGRAM 14:
#include<iostream.h>
#include<conio.h>
#include<iomanip.h>
#include<process.h>
#define MAX 3
class Stack
{
private:
int A[MAX], top;
public:
Stack() // Constructor to initialize TOP pointer
{
top = -1;
}
void push(int);
void pop( ); // Member Functions Declaration
void display( );
};
void Stack::pop()
{
int item;
if(top == -1)
{
cout<<"Stack Empty!!!...Can't POP"<<endl;
}
else
{
item = A[top];
top--;
cout<<item<<"is successfully popped"<<endl;
}
}
32
void Stack::display( )
{
if(top == -1)
cout<<"Stack Empty!!!"<<endl;
else
{
cout<<"The Stack elements are:"<<endl;
for(int i=0; i<=top; i++)
cout<<setw(4)<<A[i];
cout<<endl;
}
}
void main( )
{
Stack S;
int choice, itm;
clrscr( );
while(1)
{
cout<<"\n Stack Push & Pop Operation Menu"<<endl;
cout<<"1.PUSH"<<endl;
cout<<"2.POP"<<endl;
cout<<"3.DISPLAY"<<endl;
cout<<"4.EXIT"<<endl;
cout<<"Enter your Choice"<<endl;
cin>>choice;
switch(choice)
{
case 1: cout<<"Push Operation"<<endl;
cout<<"enter the value of an element"<<endl;
cin>>itm;
S.push(itm);
break;
case 2: cout<<"Pop Operation"<<endl;
S.pop();
break;
case 3:
S.display();
break;
case 4: cout<<"End of the Stack Operetion"<<endl;
getch( );
exit(0);
default:cout<<"Invalid Choice...!!!"<<endl;
}
getch();
}
}
33
OUTPUT:
34
PROGRAM 15:
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#define MAX 3
class Queue
{
private:
int q[MAX],front,rear,count;
public:
Queue() // Constructor to initialize FRONT and REAR pointer
{
front = -1;
rear = -1;
}
void enqueue(int x);
int dequeue(); // Member Functions Declaration void display();
void display();
};
void Queue::enqueue(int x)
{
if(rear == MAX-1)
{
cout<<"Queue is full Overflow!!!"<<endl;
getch( );
exit(0);
}
if(front == -1)
{
front = 0;
rear = 0;
}
else
rear++;
q[rear] = x;
count++;
cout<<"Item Inserted: "<<x<<endl;
}
int Queue::dequeue()
{
int x;
if(front == -1)
{
cout<<"Queue is Empty Underflow!!!"<<endl;
getch();
exit(0);
}
35
x = q[front];
if(front == rear)
{
front = -1;
rear = -1;
}
else
front++;
count--;
return x;
}
void Queue::display()
{
if (count>0)
for(int i=front; i<=rear; i++)
cout<<q[i]<<endl;
else
cout<<"Queue is Empty!!!"<<endl;
}
void main()
{
int item, choice;
Queue Q;
clrscr( );
while(1)
{
cout<<"\nQueue Operation Menu"<<endl;
cout<<"1.Adding Element"<<endl;
cout<<"2.Deleting Element"<<endl;
cout<<"3.Display"<<endl; cout<<"4.Exit"<<endl;
cout<<"Enter your Choice"<<endl;
cin>>choice;
switch(choice)
{
case 1: cout<<"Enter the element to be inserted"<<endl;
cin>>item;
Q.enqueue(item);
break;
case 2: Q.dequeue( );
break;
case 3: cout<<"The Queue Contents:"<<endl;
Q.display( );
break;
case 4: cout<<"End of Queue Operation"<<endl;
getch();
exit(0);
default:cout<<"Invalid Choice...!!!"<<endl;
}
getch();
}
}
36
OUTPUT:
37
16. Write a program to create a linked list and appending nodes.
#include<iostream.h>
#include<conio.h>
class linklist
{
struct Node
{
int data;
Node*link;
}*START;
public:
linklist();
void print();
void Append(int num);
void count();
};
linklist::linklist()
{
START=NULL;
}
void linklist::print()
{
if(START==NULL)
{
cout<<"linked list is empty\n";
return;
}
cout<<"\nlinked list contains";
Node*p=START;
while(p!=NULL)
{
cout<<p->data<<" ";
p=p->link;
38
}
}
void linklist::Append(int num)
{
Node *newNode;
newNode=new Node;
newNode->data=num;
newNode->link=NULL;
if(START==NULL)
{
START=newNode;
cout<<num<<"is inserted as the first node";
}
else
{
Node *p=START;
while(p->link!=NULL)
p=p->link;
p->link=newNode;
cout<<endl<<num<<"is inserted"<<endl;
}
}
void linklist::count()
{
Node*p;
int c=0;
for(p=START;p!=NULL;p=p->link)
c++;
cout<<endl<<"number of elements in the linked list="<<c<<endl;
}
void main()
{
linklist *obj=new linklist;
clrscr();
obj->print();
obj->Append(100);
obj->print();
obj->count();
obj->Append(200);
obj->print();
obj->count();
obj->Append(300);
obj->print();
obj->count();
getch();
}
39
OUPUT :
SECTION – B
STRUCTURED QUERY LANGUAGE (SQL)
PROGRAM 1:
Solution:
1) Creating a table
create table elec_bill(
rr_number varchar(3),
consumer_name varchar(35),
date_billing date,
units numeric(6,2));
42
5) Command to compute bill amount
update elec_bill set amount =50;
update elec_bill set amount=amount+100*4.50 where units<=100;
update elec_bill set amount=amount+100*4.50+(units-100)*5.50 where units>100;
43
PROGRAM 2:
1. Add records into the table for 10 students for Student ID, Student Name and marks in 6
subjects using INSERT command.
2. Display the description of the fields in the table using DESC command.
3. Alter the table and calculate TOTAL and PERC_MARKS.
4. Compute the RESULT as “PASSP or “FAIL” by checking if the student has scored more
than 35 marks in each subject.
5. List the contents of the table.
6. Retrieve all the records of the table.
7. Retrieve only ID_NO and S_NAME of all the students.
8. List the students who have result as “PASS”.
9. List the students who have result as “FAIL”.
10. Count the number of students who have passed.
11. Count the number of students who have failed.
12. List the students who have percentage greater than 60.
13. Sort the table according to the order of ID_NO.
Solution:
45
7) Command to retrieve only student_id and Student_name of all the students
select student_id,student_name from student_master;
12) Command to count the number of students who have percentage more than 60
select count(*) from student_master where perc_marks>=60;
46
PROGRAM 3:
Generate the Employee details and compute the salary based on the department. Create the
following table EMPLOYEE.
Field Name Type
EMP_ID INT
DEPT_ID INT
EMP_NAME VARCHAR(10)
EMP_SALARY FLOAT
Assume the DEPARTMENT names as Purchase (Id-01), Accounts (Id-02), Sales (Id-03), and
Apprentice (Id-04)
Enter 10 rows of data for table EMPLOYEE and 4 rows of data for DEPARTMENT table.
Write the SQL statements for the following:
1. Find the names of all employees who work for the Accounts department.
2. How many employees work for Accounts department?
3. What are the Minimum, Maximum and Average salary of employees working for
Accounts department?
4. List the employees working for particular supervisor.
5. Retrieve the department names for each department where only one employee works.
6. Increase the salary of all employees in the sales department by 15%.
7. Add a new Column to the table EMPLOYEE called BONUS NUMBER (5) and compute
5% of the salary to the said field.
8. Delete all the rows for the employee in the Apprentice department.
Solution:
To insert 4 records into the table DEPARTMENT using the INSERT INTO command.
1. Find the names of all employees who work for the Accounts department
5) Retrieve the department names for each department where only one employee works.
7) Add a new Column to the table EMPLOYEE called BONUS NUMBER (5) and compute
5% of the salary to the said field.
8) Delete all the rows for the employee in the Apprentice department.
PROGRAM 4:
Create database for the Bank transaction
10) Command to Display Account No, Customer No, Name where Customer No equal to
Customer No from Bank Table
SELECT AC_NO,CUST.C_NO,NAME FROM CUST,BANK WHERE
C_NO=BANK.CUST_NO;
11) Command to delete a record having a specific phone number
12) Command to display all the records that have transaction as credit
13) Command to create a new table with account no and transaction amount
<<html>
<head>
</head>
<caption> <b> <font size=7> My Study Timetable for a week </font> <b> </caption>
<tr>
<th> Day </th>
<th> Subject </th>
<th> Morning Session </th>
<th> College Time </th>
<th> Evening Session </th>
<th> QP Solving Time </th>
</tr>
<tr>
<td> Monday </td>
<td> Lang 1 </td>
<td> 5.00am - 7.00am </td>
<td> 8.30am - 4.30pm </td>
<td> 7.00pm - 9.00pm </td>
<td> 10.00pm - 11.00pm </td>
</tr>
<tr>
<td> Tuesday </td>
<td> Lang 2 </td>
<td> 5.00am - 7.00am </td>
<td> 8.30am - 4.30pm </td>
<td> 7.00pm - 9.00pm </td>
<td> 10.00pm - 11.00pm </td>
</tr>
56
<tr>
<td> Wednesday </td>
<td> Physcics </td>
<td> 5.00am - 7.00am </td>
<td> 8.30am - 4.30pm </td>
<td> 7.00pm - 9.00pm </td>
<td> 10.00pm - 11.00pm </td>
</tr>
<tr>
<td> Thursday </td>
<td> Chemistry </td>
<td> 5.00am - 7.00am </td>
<td> 8.30am - 4.30pm </td>
<td> 7.00pm - 9.00pm </td>
<td> 10.00pm - 11.00pm </td>
</tr>
<tr>
<td> Friday </td>
<td> Maths </td>
<td> 5.00am - 7.00am </td>
<td> 8.30am - 4.30pm </td>
<td> 7.00pm - 9.00pm </td>
<td> 10.00pm - 11.00pm </td>
</tr>
<tr>
<td> Saturday </td>
<td> Computer Science </td>
<td> 5.00am - 7.00am </td>
<td> 8.30am - 4.30pm </td>
<td> 7.00pm - 9.00pm </td>
<td> 10.00pm - 11.00pm </td>
</tr>
</table>
</body>
</html>
57
OUTPUT
PROGRAM 2:
<html>
<head>
</head>
<body>
<form>
<table>
<tr>
<td> Student Name: </td>
<td> <input type=text name=stuname> </td>
</tr>
58
<tr>
<td> Father Name: </td>
<td> <input type=text name=fatname> </td>
</tr>
<tr>
<td> Address </td>
<td> <textarea rows=5 cols=20 name=add> </textarea> </td>
</tr>
<tr>
<td> Date of Birth </td>
<td> <input type=date name=dob> </td>
</tr>
<tr>
<td> Email ID </td>
<td> <input type=text name=eid>
Password:<input type=password name=pwd> </td>
</tr>
<tr>
<td> Gender:</td>
<td> <input type=radio name=gen value=m> Male
<input type=radio name=gen value=f> Female
</td>
</tr>
<tr>
<td> Subject Choosen: </td>
<td> <input type=checkbox name=sub value=kan> Kannada
<input type=checkbox name=sub value=eng> English
<input type=checkbox name=sub value=phy> Physics
<input type=checkbox name=sub value=che> Chemistry
<input type=checkbox name=sub value=mat> Maths
<input type=checkbox name=sub value=cs> Computer Science
<input type=checkbox name=sub value=bio> Biology
</td>
</tr>
<tr>
<td> <input type=submit value="Submit the form"> </td>
<td> <input type=reset value="Reset the form"> </td>
</tr>
<table>
<form>
59
<br>
<br>
<br>
<tr>
<td> June </td>
<td> 18 </td>
<td> <input type=text size=2 maxlength=2> </td>
</tr>
<tr>
<td> July </td>
<td> 25 </td>
<td> <input type=text size=2 maxlength=2> </td>
</tr>
<tr>
<td> August </td>
<td> 22 </td>
<td> <input type=text size=2 maxlength=2> </td>
</tr>
<tr>
<td> September </td>
<td> 20 </td>
<td> <input type=text size=2 maxlength=2> </td>
</tr>
<tr>
<td> October </td>
<td> 23 </td>
<td> <input type=text size=2 maxlength=2> </td>
</tr>
</table>
</body>
60
</html>
OUTPUT
61