aim: program coding - · write a c++ program by using switch case structure to display the...
TRANSCRIPT
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
1. FIBONACCI SERIES
PROBLEM:
Write a C++ program to generate the Fibonacci for n terms.
AIM:
To write a C++ program to generate the Fibonacci for n terms.
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
void main()
{
int f1= -1,f2=1,f3;
int i,n;
cout<<"\n Enter the no of terms….";
cin>>n;
cout<<"\n Fibonacci series is …"<<’\n’;
for(i=1;i<=n;i++)
{
f3=f1+f2;
cout<<f3<<'\n';
f1=f2;
f2=f3;
}
getch();
}
EXECUTION AND OUTPUT:
Enter the no of terms….10
Fibonacci series is …
0
1
1
2
3
5
8
13
21
34
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
2. FACTORIAL OF A NUMBER
PROBLEM:
Write a C++ program using Function to find the factorial of a given number
AIM:
To write a C++ program using Function to find the factorial of a given number
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
unsigned long int fact(int n)
{
int f=1;
for(int i=1;i<=n;i++)
f*= i;
return (f);
}
void main()
{
int a;
clrscr();
cout<<"\n Enter the value….";
cin>>a;
cout<<"\n Factorial of given number is . . ."<<fact(a);
getch();
}
EXECUTION AND OUTPUT:
Enter the value…. 5
Factorial of given number is . .. 120
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
3. NUMBER IN WORDS
PROBLEM:
Write a C++ program by using Switch case structure to display the given number
in words.( numbers between 1 to 9)
AIM:
To write a C++ program by using Switch case structure to display the given
number in words.( numbers between 1 to 9)
#include<iostream.h>
#include<conio.h>
void main()
{
int n;
clrscr();
cout<<"\n Enter the number…";
cin>>n;
switch(n)
{
case 1:cout<<"\n ONE";break;
case 2:cout<<"\n TWO";break;
case 3:cout<<"\n THREE";break;
case 4 :cout<<"\n FOUR";break;
case 5 :cout<<"\n FIVE";break;
case 6 :cout<<"\n SIX";break;
case 7 :cout<<"\n SEVEN";break;
case 8 :cout<<"\n EIGHT";break;
case 9 :cout<<"\n NINE";break;
default :cout<<"\n INVALID INPUT";break;
}
getch();
}
EXECUTION AND OUTPUT:
Enter the number…2
TWO
Enter the number…11
INVALID INPUT
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
4. PALINDROME
PROBLEM:
Write a C++ program to check whether the given string is PALINDROME or NOT.
AIM:
Write a C++ program to check whether the given string is PALINDROME or NOT.
PROGRAM CODING:
#include<iostream.h> (or)
#include<conio.h>
#include<string.h>
#include<stdio.h>
void main()
{
char str[50],rstr[50];
clrscr( );
cout<<”\n Enter the string….”;
gets(str);
strcpy(rstr, str);
strrev(rstr);
cout<<"\n Reversed string is…"<<rstr;
if(strcmp(str,rstr)==0)
cout<<"\n Given string is a palindrome";
else
cout<<"\n Given string is not a palindrome” ;
getch ( );
}
EXECUTION AND OUTPUT:
Enter the string… MADAM
Reversed string is…MADAM
Given string is a palindrome
Enter the string… SURESH
Reversed string is…HSERUS
Given string is not a palindrome
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
5. NUMBER OF ODD AND EVEN NUMBERS
PROBLEM:
Write a C++ program to find the number of Odd and Even numbers in a given array.
AIM:
To write a C++ program to find the number of Odd and Even numbers in a given array.
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
void main()
{
int x[100],n,i,even=0,odd=0;
clrscr();
cout<<"\n Enter the value of n…";
cin>>n;
cout<<"\n Enter the value one by one…"<<’\n’;
for(i=0;i<n;i++)
{
cin>>x[i];
if(x[i]%2==0)
even++;
else
odd++;
}
cout<<"\n No. of even no’s…"<<even;
cout<<"\n No. of odd no’s…"<<odd;
getch();
}
EXECUTION AND OUTPUT:
Enter the value of n…5
Enter the value one by one…
1
2
3
4
5
No. of even no’s…2
No. of odd no’s…3
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
6. TRANSPOSE OF 3 x 3 MATRIX
PROBLEM:
Write a C++ program to Transpose a 3 x 3 matrix
AIM:
To write a C++ program to Transpose a 3 x 3 matrix.
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
void main()
{
int matA[3][3];
int i,j;
clrscr();
cout<<"\n Enter matrix in row wise . . ."<<’\n’;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cin>>matA[i][j];
}
}
cout<<"\n The given matrix is . . "<<’\n’;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<matA[i][j]<<'\t';
}
cout<<'\n';
}
cout<<"\n Transpose matrix is . ."<<’\n’;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cout<<matA[j][i]<<'\t';
}
cout<<'\n';
}
getch();
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
EXECUTION AND OUTPUT
Enter matrix in row wise . . .
1
2
3
4
5
6
7
8
9
The given matrix is . .
1 2 3
4 5 6
7 8 9
Transpose matrix is . .
1 4 7
2 5 8
3 6 9
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
7. ADDITION OF TWO MATRICES
PROBLEM:
Write a C++ program to add two 3 x 3 matrices
AIM:
To write a C++ program to add two 3 x 3 matrices.
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
void main()
{
int matA[3][3],matB[3][3],matC[3][3];
int i,j;
clrscr();
cout<<"\n Enter matA in row wise . .\n ";
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cin>>matA[i][j];
}
}
cout<<"\n Enter matB in row wise . .\n ";
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
cin>>matB[i][j];
}
}
cout<<"\n Sum of matrix is . ."<<’\n’;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
matC[i][j]=matA[i][j]+matB[i][j];
}}
for(i=0;i<3;i++)
{
for(i=0;i<3;i++)
{
cout<<matC[i][j]<<'\t';
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
}
cout<<'\n';
}
getch();
}
EXECUTION AND OUTPUT
Enter matA in row wise . .
1
2
3
4
5
6
7
8
9
Enter matB in row wise . .
9
8
7
6
5
4
3
2
1
Sum of matrix is . .
10 10 10
10 10 10
10 10 10
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
8. PRIME NUMBER
PROBLEM:
Write a C++ program using Function to determine whether the given number is
PRIME or NOT.
AIM:
To write a C++ program using Function to determine whether the given number is
PRIME or NOT.
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
void prime(int x)
{
for(int i=2;i<x;i++)
if(x%i= =0)
{
cout<<x<<"\n The given number is not a prime number ";
return;
}
cout<<x<<"\n The given number is a prime number ";
return;
}
void main()
{
int n;
clrscr();
cout<<"\n Enter the number . . .";
cin>>n;
prime(n);
getch();
}
EXECUTION AND OUTPUT
Enter the number. .. 11
The given number is a prime number
Enter the number. .. 20
The given number is not a prime number
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
9. NET PAY
PROBLEM:
Write a C++ program to define a class employee with following specifications
Private members of class employee
Empno - interger
Ename - 20 characters
Basic - float
Netpay, hra, da - float
Calculate( ) – A function to find the basic+hra+da with float return type
Public member function
havedata( ) – A function to accept values for empno,ename,basic, hra, da and
call calculate ( ) to compute netpay
dispdata( ) – A function to display all the data members on the screen.
AIM:
To Write a C++ program to find out the net pay of an employee using classes.
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
class employee
{
private:
int empno;
char ename[20];
float basic,netpay,hra,da;
float calculate( )
{
netpay = basic+hra+da;
return netpay;
}
public:
void havedata( )
{
cout<<”\n Enter the ename, empno,basic,hra,da…..”<<’\n’;
cin>>ename>>empno>>basic>>hra>>da;
calculate( );
}
void dispdata( )
{
cout<<”\n Employee Name……….:”<<ename;
cout<<”\n Employee Empno……….:”<<empno;
cout<<”\n Employee Basic……….:”<<basic;
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
cout<<”\n Employee Hra……….:”<<hra;
cout<<”\n Employee Da……….:”<<da;
cout<<”\n Employee Netpay……….:”<<netpay;
}
};
void main( )
{
clrscr( );
employee emp;
emp.havedata( );
emp.dispdata( );
getch( );
}
EXECUTION AND OUTPUT
Enter the ename, empno,basic,hra,da…..
SURESH KUMAR
003
13000
2250
750
Employee Name……….: SURESH KUMAR
Employee Empno………: 003
Employee Basic…………: 13000
Employee Hra…………..: 2250
Employee Da……………: 750
Employee Netpay……….: 16000
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
10. MAXIMUM OF TWO NUMBERS OR THREE NUMBERS
PROBLEM:
Write a C++ program that uses function overloading to do the following tasks.
a) Find the maximum of two numbers (integers)
b) Find the maximum of three numbers (integers)
AIM:
To write a C++ program to find the maximum of two numbers or maximum of
three numbers using overloading.
PROGRAM CODING
# include<iostream.h>
# include<conio.h>
int max ( int a, int b)
{
if ( a>b)
return (a);
else
return(b);
}
int max ( int a, int b, int c)
{
if ( a>b && a>c)
return (a);
else if(b>c)
return(b);
else
return (c);
}
void main( )
{
int x , y, z, ch;
clrscr( );
cout<<”\n\n1. Maximum of two numbers”;
cout<<”\n\n2. Maximum of three numbers”;
cout<<”\n\n Enter your choice…”;
cin>>ch;
switch(ch)
{
case 1:
cout<<”\n Enter the two numbers…”<<’\n’;
cin>>x>>y;
cout<<max(x, y);
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
break;
case 2:
cout<<”\n Enter the three numbers…”<<’\n’;
cin>>x>>y>>z;
cout<<max(x, y, z);
break;
default:
cout<<”\n Exit”;
}
getch( );
}
EXECUTION AND OUTPUT
1. Maximum of two numbers
2. Maximum of three numbers
Enter your choice…1
Enter the two numbers…
20
30
30
1. Maximum of two numbers
2. Maximum of three numbers
Enter your choice…2
Enter the three numbers…
20
35
15
35
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
11. SUM AND DIFFERENCE
PROBLEM:
Write a C++ program to find the sum and difference of two numbers using
inheritance.
Add Subtract
public add( ),accept ( ), Plus ( ) subtract( ), minus ( )
private sum sub
protected num1, num2
AIM:
To write a C++ program to find the sum and difference of two numbers using
inheritance.
PROGRAM CODING
# include<iostream.h>
# include<conio.h>
class add
{
private:
int sum;
protected:
int num1,num2;
public:
add( )
{
num1=num2= sum=0;
cout<<”\n Add constructor..”;
}
void accept( )
{
cout<<”\n Enter the numbers…”<<’\n’;
cin>>num1>>num2;
}
void plus( )
{
sum= num1+num2;
cout<<”\n The sum of two numbers are….”<<sum;
}
};
class subtract : public add
{
int sub;
public:
subtract( )
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
{
sub=0;
cout<<”\n Subtract constructor..”;
}
void minus( )
{
add : : accept( );
sub= num1 – num2;
cout<<”\n The differences of two numbers are…”<<sub;
}
};
void main( )
{
subtract s;
int ch;
clrscr( );
cout<<”\n 1. Add”;
cout<<”\n 2. subtract”;
cout<<”\n Enter your choice….”;
cin>>ch;
switch( ch)
{
case 1:
s.accept( );
s. plus( );
break;
case 2:
s.minus( );
break;
default:
cout<<”\n Exit”;
}
getch( );
}
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
EXECUTION AND OUTPUT
Add
Subtract
Enter your choice…1
Enter the numbers…
25
35
The sums of two numbers are…60
Add
Subtract
Enter your choice…2
Enter the numbers…
50
35
The differences of two numbers are…15
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
PROBLEM:
Write a C++ program to get following output
C
CO
COM
COMP
COMPU
COPMUT
COMPUTE
COMPUTER
AIM:
To write a C++ program to display a string pattern
PROGRAM CODING:
#include<iostream.h>
#include<conio.h>
void main ( )
{
clrscr( );
char name[ ]="COMPUTER";
int i=1;
while(i<9)
{
cout.write(name,i);
cout<<'\n';
i++;
}
getch( );
}
EXECUTION AND OUTPUT
C
CO
COM
COMP
COMPU
COPMUT
COMPUTE
COMPUTER
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
SECTION B
C++
EX.NO DESCRIPTION
1
FIBONACCI SERIES
2
FACTORIAL OF A GIVEN NUMBER USING FUNCTION
3
NUMBER IN WORDS – USING SWITCH
4
PALINDROME OT NOT
5
NUMBER OF EVEN AND ODD NUMBERS
6
TRANSPOSE OF 3x3 MATRIX
7
ADDITION OF TWO MATRICES
8
PRIME NUMBER OR NOT
9
NET PAY – USING CLASSES
10
MAXIMUM OF TWO AND THREE NUMBERS USING OVERLOADING
11
SUM AND DIFERENCE OF TWO NUMBERS – USING INHERITANCE
12
DISPLAY A STRING PATTERN
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
1. TEXT EDITING AND FORMATTING
Question: Enter the given text
Heaven from all creatures hides the book of fate
All but the page prescribe the present state
A hero perishes or a sparrow fall
Apply the following commands to the text given above
a) Cut, Copy, Paste using Mouse and Keyboard shortcut keys
b) Find “Heaven” and Replace with “God”
c) Change the font style and color
d) Align the first line by left, right, center and justify alignments
e) Align the second line by bulleted or numbered lists
f) Correct typographical mistake using Autocorrect option
Aim:
1. To enter the given text
2. To perform Cut, Copy, Paste using Mouse and Keyboard shortcut keys
3. To find “Heaven” and Replace with “God”
4. To change the font style and color
5. To align the first line by left, right, center and justify alignments
6. To align the second line by bulleted or numbered lists
7. To correct typographical mistake using Autocorrect option
Procedure:
Start All programs Star office 8 StarOffice Writer.
Enter the given text
To perform Cut and Paste using Mouse and Keyboard shortcut keys
Select the text to be moved
Select EditCut from menu or Ctrl + X from keyboard
Place the insertion point in the desired location
Select EditPaste from menu or Ctrl + V from keyboard
To perform Copy and Paste using Mouse and Keyboard shortcut keys
Select the text to be copied
Select EditCopy from menu or Ctrl + C from keyboard
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Place the insertion point in the desired location
Select EditPaste from menu or Ctrl + V from keyboard
To find “Heaven” and Replace with “God”
Select EditFind & Replace from menu
Enter the word “Heaven” in Search for text box
Enter the word “God” in Replace with text box
Click on Replace All to replace all the occurrences
To change the font style and color
Select the text whose font style and color is to be changed
Select Format Character from menu
Click on Font tab and select the required style from the list
Click on Font effects and select the desired color from the Font color
drop down list
Click OK
To align the first line by left, right, center and justify alignments
Select the paragraph to be aligned
To left align press Ctrl + L from keyboard
To right align press Ctrl + R from keyboard
To center align press Ctrl + E from keyboard
To justify press Ctrl + J from keyboard
To align the second line by bulleted or numbered lists
Select the second line
Select Format Bullets and Numbering from menu
Select the required style from the list
Click OK
To correct typographical mistake using Autocorrect option
Select Tools Autocorrect from menu
Enter the misspelled word in Replace text box
Enter the correct word in With text box
Click on New button
Click OK
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Output:
Heaven from all creatures hides the book of fate
All but the page prescribe the present state
A hero perishes or a sparrow fall
God from all creatures hides the book of fate All but the page prescribe the present state
A hero perishes or a sparrow fall
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
2. PAGE FORMATTING
Question:
Create a text with four lines. To the text increase or decrease the margin by ½
inch. Change the original setting using ruler option. Change the page orientation. Insert
Topic name as Header and Page number as Footer.
Aim:
1. To enter four lines of text
2. To change the original setting using ruler option.
3. To increase or decrease the margin by ½ inch and change page orientation
4. To insert topic name as Header and page number as Footer.
Procedure:
Start All programs Star office 8 StarOffice Writer.
Enter four lines of text
To change the original setting using ruler option.
Click on View Ruler to display the ruler if not visible
Move the mouse pointer between white and grey area, when it is in the right
position
It changes to double headed arrow
Press and hold down the left mouse button and drag to resize.
To change the margin and page orientation.
Click on Format Page, select Page tab
Change the Left and Right margin value using spin arrows under Margins
Select Landscape radio button under orientation
Click OK
To insert topic name as Header and page number as Footer.
Click on Format Page, select Header tab
Click on Header on check box
Click on Format Page, select Footer tab
Click on Footer on check box
Click OK
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Header and Footer area seen separately by a thin lined box at the top and bottom
respectively.
Place the insertion point in the Header area and enter the topic name.
Place the insertion point in the Footer area
Select Insert Fields Page Number from the menu to add page number to
footer.
Output:
Book of Fate
Heaven from all creatures hides the book of fate
All but the page prescribe the present state
A hero perishes or a sparrow fall
This is the destiny of life
1
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
3. TABLE CREATION
Question:
Create a table and enter the names of the five students and marks in three subjects.
Change the borders, line style and background color of table. Add two more names and
marks respectively.
Aim:
To create a table and enter the names of the five students and marks in three
subjects, change the borders, line style and background color of table and add two
more names
and marks respectively.
Procedure:
Start All programs Star office 8 StarOffice Writer.
To create a table and enter data
Select Table Insert Table from menu
Enter Marks in Name text box.
Enter 4 in Columns spin box.
Enter 6 in Rows spin box.
Click OK
A blank table with 4 columns and 6 rows is created.
Enter the data in the table using TAB and Shift + Tab to move forward and
backward in a table respectively.
Name Physics Chemistry Maths
Kailash 156 160 180
Sanjay 170 145 164
John Paul 157 190 200
Arjun 177 183 172
Siddharth 174 190 188
To change the borders, line style and background color of table
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Select the table, table formatting toolbar is displayed
Click Border icon from the table formatting toolbar, select the required style
from the list.
Click Line style icon from the table formatting toolbar, select the required style
from the list.
Click Background icon from the table formatting toolbar, select the required
color from the color palette.
To add two more names and marks
Select Table Insert Rows from menu
Enter 2 in the Amount spin box
Click OK
Enter the data name and marks under the respective heading.
Output:
Name Physics Chemistry Maths
Kailash 156 160 180
Sanjay 170 145 164
John Paul 157 190 200
Arjun 177 183 172
Siddharth 174 190 188
Gowtham 159 160 195
Sarvesh 183 172 200
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
4. WORKSHEET – MARKLIST
Question:
Create a worksheet to enter the names and marks of five students in three
subjects. Find the class average for one subject and copy using Fill to others.
Aim:
To create a worksheet and enter the names and marks of five students in three
subjects. Find the class average for one subject and copy using Fill to others.
Procedure:
Start All programs Star office 8 StarOffice Calc.
To enter the names and marks of five students in three subjects.
Enter Name in cell A1
Enter Physics in cell B1
Enter Chemistry in cell C1
Enter Maths in cell D1
Enter the details of five students under each heading respectively, using TAB and
Shift + Tab to move forward and backward in worksheet.
.
To find the class average for one subject and copy using Fill command.
Type Sub-Average in cell A7
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Enter the formulae = AVERAGE ( B2 : B6 ) in cell B7
Select the range B7 to D7
Select Edit Fill Right from the menu.
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
5. WORKSHEET – EMPLOYEE GROSS PAY CALCULATION
Question:
Create a worksheet to enter the following details for five employees.
a. Employee Name, Employee number, Basic pay, DA, CCA, HRA
b. Calculate Gross pay using formulae.
c. Change the Row height and Column width.
d. Sort the record in alphabetical order of employee names.
e. Add two more employee details.
f. Delete one employee detail.
g. Create a Line or Pie chart to show the variation of Basic pay.
Aim:
To create a worksheet to enter the following details for five
To calculate Gross pay using formulae.
To change the Row height and Column width.
To sort the record in alphabetical order of employee names.
To add two more employee details.
To delete one employee detail.
To create a Pie chart to show the variation of Basic pay.
Procedure:
Start All programs Star office 8 StarOffice Calc.
To enter the following details for five
Enter EmpNo in cell A1
Enter EmpName in cell B1
Enter Basic in cell C1
Enter DA in cell D1
Enter CCA in cell E1
Enter HRA in cell F1
Enter Gross Pay in cell G1
Enter the details of five employees under each heading respectively, using TAB
and Shift + Tab to move forward and backward in worksheet.
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
To calculate Gross pay using formulae.
Enter the formulae = SUM ( C2 : F2 ) in cell G2
Select the range G2 to G6
Select Edit Fill Down
To change the Row height and Column width.
Select Format Row Height from menu, to change the row height, enter
new value and click OK
Select Format Column Width from menu, to change the column width,
enter new value and click OK
To sort the record in alphabetical order of employee names.
Select the range A2 to G6
Select Data Sort from menu
Select Name from the drop down list under Sort by
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Select Ascending radio button
Click OK
To add two more employee details.
Place the cell pointer in A7 and enter the details of two employees under each
heading respectively, using TAB and Shift + Tab to move forward and backward in
worksheet.
To delete one employee detail.
Select the row to be deleted by clicking on the Row header
Select EditDelete Cells from menu
Select Delete entire row(s) radio button
Click OK
To create a Pie chart to show the variation of Basic pay.
Select Insert Chart
Select the range C2 to C7
Click on the worksheet area where chart is to be placed.
Click Next
Select Pie chart from the list and Select Column radio button
Click Create
Output:
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
6. WORKSHEET – FILL SERIES
Question:
Generate the following series using Star calc.
a. 3/5/00, 3/12/00, 3/19/00 ……….5/28/00.
b. 16, 32, 64,……2048.
c. 33, 30, ……….3.
Aim:
To generate the given series using Fill command.
Procedure:
Start All programs Star office 8 StarOffice Calc.
To generate the date series 3/5/00, 3/12/00, 3/19/00 ……….5/28/00.
Select the range A1 to A20
Select Edit Fill Series
Select Down under Direction
Select Date under Series type
Select Day under Time unit
Enter 3/5/00 in Start value text box
Enter 5/28/00 in End value text box
Enter 7 in the Increment text box
Click OK
To generate the series 16, 32, 64,……2048.
Select the range C1 to C20
Select Edit Fill Series
Select Down under Direction
Select Growth under Series type
Enter 16 in Start value text box
Enter 2048 in End value text box
Enter 2 in the Increment text box
Click OK
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
To generate the series 33, 30, ……….3.
Select the range E1 to E20
Select Edit Fill Series
Select Down under Direction
Select Linear under Series type
Enter 33 in Start value text box
Enter 3 in End value text box
Enter -3 in the Increment text box
Click OK
Output:
www.Padasalai.Net www.TrbTnpsc.com
http://www.trbtnpsc.com/2013/07/latest-12th-study-materials-2013.html
Prepared by Mr. Suresh Kumar.