FOCP Lab Manual Printout
FOCP Lab Manual Printout
1
Document creation and Text Manipulation with scientific notation
Aim:-
To create a word document and perform text manipulation with scientific notation.
Procedure
(1) Open a new document using file -> new option and type the text
(2) For justification select the entire text in the document. Then press Ctrl + J or
select the justify button on the formatting tool bar.
(3) For Bold face of the words, select the word then press Ctrl + B or select bold
button on the formatting tool bar.
(4) For spelling correction select the word you want to correct then right click.
(5) Click on spelling and grammar button on the standard tool bar.
(6) Select the text which you want to make italic style. Then press Ctrl + I or italic
button on the formatting tool bar.
(7) For saving the document press Ctrl + S. or Click on save button on the standard
tool bar,
(8) Or select the save option from the file menu.
Today, the SRM GROUP, with its more than 17 Educational Institutions, in different
locations in the Country, is highly ranked amongst the leading Groups of Educational
1
Institutions. A major thrust is placed for enhancing excellence through a large variety
of structured Academic Programs, designed with Topics of relevance, as per UGC
Norms; These are included in the Curricula of the SRM Deemed University; these cover
Under-Graduate, Post-Graduate Courses and Ph.D. Programs in various Disciplines,
such as, Engineering and Technology, Medicine, Dental Science and Surgery, Life
Sciences, Management, Hospitality and Hotel Management, Paramedical, Nursing and
Arts and Science
Procedure
☼ -> Sun
♫ -> Music
™ -> Trade Mark
√ -> Tick Mark
$ -> Dollar
Procedure
(2) Type the text then put the cursor where you want to add the symbols
IV Change the different types of font types and sizes as given below:
2
(1) Select the text you want to change for font types and sizes.
(2) Then Choose font option from the format menu
(3) Choose the required forn type from the font drop down list box and the required
size from the size list box on the font dialog box .
(4) Then click on Ok.
(V) Try out the following equations in your document
(A + B) 2 = A2 + B2 + 2 A B
− b ± b 2 − 4ac
2a
m
Pr ∑ x j > T
j =0
Procedure
(1) Click on insert object
(2) Choose Microsoft Equation using Equation Editor, Click on Ok
(3) Now the Microsoft equation tool bar appears,
(4) Using this tool bar , we can type any equations in this document.
Result: Word document document has been created and text manipulations have been
performed with scientific notations.
Exercises
Ex. No:2
3
II Table Creation, Table Formatting and Conversion
Aim: To perform table creation ,table formatting and conversions in MS word
Procedure
Create the Table with the following columns and display the results in the separate cells
for the following
Go to Table menu -> Select Sort , It shows the sort dialog box
In the Sort by option select Employee name from the drop down list and select
ascending option and click ok.
4
To find the grand salary, choose, in the formula dialog box
Type=SUM(above), No the grand salary is displayed
Describe the steps to split a Cell and merge two cells in a Table
Write the steps to split a single Table to dual Table
Procedure:
(1) Choose the convert text to table option from the table menu.
(2) Now it shows the convert text to table dialogue box .
(3) Choose the table size and separator text option . Then click Ok.
(4) Now the text information is converted into table.
Result: Table creation, table formatting and conversions have been performed in MS
word
5
Ex. No.3
MAIL MERGE
Mail merge is powerful feature in MS Word that helps you to create form letters, mailing
labels, envelopes, or catalogues. With mail merge you can get rid of the usual practice
of cutting and pasting labels in every copy of the letter.
The body of the letter is typed and saved in as a file named main document. The
addresses are typed and stored in another file called data source. By doing a mail
merge you are linking the main document with the data source. Another advantage of
using mail merge is that the next time you need to send a letter to the same set of
recipients, you can use the same data source file.
6
Step 6: Type the list of addresses(at least 3) and click to close. (Close will
automatically save –Give a name of the file).
7
Step 7: Next: Write your letter
To
The Administrative Officer
Madras Atomic Power Station
Kalpakkam – 603 102.
Dear Sir,
We shall be very grateful if you kindly permit them to visit your plant and oblique.
Thanking you.
Yours faithfully,
Principal
Contact Person:
K.Parimala Kanaga Devan
Assistant Profeesor / IT
Easwari Engineering College
Mobile: 9841726794.
E_Mail: [email protected]
8
Step 8: Click more items… link
Select the address fields and press Insert button-This will bring the
corresponding
fields in the main document.
Step 9: Next: Preview your letters link.
9
Result: A Letter has been prepared using mail merge concept.
Ex.No 4
10
Drawing flow chart
Start
Read N
No
If N>0
Yes
Sum=N*(N+1) / 2
Print Sum
Stop
Result:
Thus the flowchart has been drawn for computing sum of n numbers using MS word
11
MS EXCEL CASE STUDY
MS Excel is spreadsheet software used to create and manage data and also for
analyzing the data for information. The usage of this software is similar to MS Word,
and is simple menu-driven software.
Excel spreadsheet consists of a grid of rows and columns. The intersection of a row
and a column is called a cell.
The rows are numbered 1, 2, 3 ….and so on, and columns are labelled alphabetically A,
B, C… and so on. Each spreadsheet contains 16384 rows and 256 columns that make
4,194,304 cells. Each cell can store a piece of text, number or formula in it.
12
Parts of an Excel Spreadsheet :
Just like MS Word we have the Title bar, Menu Bar, Tool bar, Formatting Tool bar,
Scroll bar etc. In addition to these, there are Formula bar and Cells to store and work
with data.
EX.NO:5
Chart - Line, XY, Bar and Pie
DATE:
Question:
The ABC Company shows the sales of different products for 5 years.
Create BAR Graph, 3D, Pie and LINE.
Aim:
TO Create a BAR Graph,3D,Pie and Line Charts for Sales Report of given
Company
Procedure:
13
3. Choose appropriate Chart type from the Chart type list box then click next.
(Note:-It shows the Chart Wizard Step 2 of 4 Chart source data dialog box.).
4. Select data range and series Values from work sheet then click next. .(Note:-It
shows the Chart Wizard Step 3 of 4 Chart Option dialog box.).
5. Give Chart title, X- Axis, Y-Axis Titles etc, then click next. .(Note:-It shows the
Chart Wizard Step 4 of 4 Chart Location dialog box.).
6. Select the location in which you want to place the Chart, and then click Finish.
BAR GRAPH:
AB C C OMPANY SALES
2009
2008
2007
Year
PR O D UC T4
2006 PR O D UC T3
PR O D UC T2
2005
PR O D UC T1
0 500 1000 1500 2000
N o .o f P r o d u c ts
3D GRAPH:
14
ABC COMPANY SALES
100%
80%
60% PRODUCT4
sales %
40% PRODUCT3
PRODUCT2
20%
PRODUCT1
0%
2005 2006 2007 2008 2009
year
PIE CHART:
PRODUCT4, PRODUCT1,
1000, 27% 1000, 27%
PRODUCT1
PRODUCT2
PRODUCT3
PRODUCT4
PRODUCT3, PRODUCT2,
900, 24% 800, 22%
LINE CHART:
15
Result:
16
Ex.No 6. Formula - formula editor
Date:
Aim:
class
Procedure:
Let us create a spreadsheet of marks of the students of a class and also prepare charts
to analyse the marks. Consider a list of 10 students and their test marks. Tabulate the
marks and prepare a chart to show the average marks scored by the students in the
subjects.
Formula bar
ar
Cells
Step 2: Click on the first cell and type the title of the table
Step 3: Now select any cell below the title and type the name of the subjects.
Step 4: Enter the marks secured by the students in the cells just below the respective
subjects. To edit the content of a cell, click on the cell and press the F2 key.
17
Step 5: You can adjust a cell to fit its content by selecting AutoFit. Click Format in the
menu bar Column AutoFit Selection.
Step 6: To calculate the average, click and select an empty cell below the marks.
Select function from Insert menu.
18
Step 7: Select AVERAGE from the function.
Step 8: Confirm the ranges of data in the cell i.e. from cell B9:B18 and click OK.
The average will be displayed on the cell.
19
Step 9: To copy the average function for other subjects, simply hold the lower right
corner of the cells and drag it using left mouse button. Now the average marks for
other subjects will be displayed.
20
Result:
Thus Student’s Mark Sheet has been creared and analysed successfully.
21
Ex.No 7. Spread sheet - inclusion of object, Picture and
graphics, protecting the document and sheet.
Question:
Aim:
Procedure:
22
2.Insert a picture.
23
3.Inserting comments in the worksheet.
4.Organization Chart.
a) Choose Organization Chart option in the Picture option of the Insert Menu.
(Now it opens the Microsoft Organization Chart.)
b) Type the text in the boxes provided and use appropriate options.
24
5.Protect a sheet in MS-Excel.
25
To remove protection ,
choose Tools->Protection->Unprotect Sheet, then type the password to unprotect.
( Note: - Now the sheet can be unprotected.)
Result:
26
Ex.NO 8. Sorting and Import / Export features.
Question:
Sort the data by “Salary” within the department using “Sort” Command.
Calculate total salary of each department using Auto Filter.
Procedure:
27
3. Click New button in the Form to add the rows to the list.
4. After adding the rows, place the cursor in the list in the worksheet.
5. Click Data-> Sort,it shows the Sort diaiog box,as shown below.
28
10.On the Dept click the icon select CSE.(Note:- The list of rows
which belongs to CSE is displayed.)
11.Place the cursor in A15, find the sum using SUM formula.
In the same way find each departments total salary.
29
II.Import and Export Features:
Question:
Import the Data from Specified Table to given Worksheet.
Solution:
Steps:
2. Open the Worksheet and Select Import External Data from Data Option.
3. Select Import Data Option.
4. Select the Database file you want to import .
5. Specify the location you want to put the Table.
6. Click OK(Note:- Table will be shown in your Work Sheet as below.)
Result:-
30
Exp.No:9
Aim:-
To write a simple menu driven calculator program expressions using switch statement.
Read option
Read n1, n2
is option yes
=1
no a n1 + n2
yes is option
Print a
=2
no
s n1 – n2 Stop
is option yes
Print s =3
no p n1 * n2
Stop
yes is option
=4 Print p
yes is n2 = no
0
Stop Stop
no
Print
“Division by q n1 / n2
zero-Error”
Print q
Stop
Stop
31
// Program:-
/* program to simulate a simple calculator */
#include <stdio.h>
#include <conio.h>
void main( )
{
int option, n1, n2, a, s, p, q ;
//clrscr ( ) ;
printf ("\n\t\t Menu") ;
printf ("\n Press 1 for Addition") ;
printf ("\n 2 for Subtraction") ;
printf ("\n 3 for Multiplication") ;
printf ("\n 4 for Division") ;
printf ( "\n\n Enter your option : \n") ;
scanf ("%d", &option) ;
printf ("\n Enter first value : \n") ;
scanf ("%d", &n1) ;
printf ("\n Enter second value : ") ;
scanf ("%d", &n2) ;
switch(option)
{
case 1 : a = n1 + n2; printf ("\n Addition n1+n2 = %d", a); break;
Result:-
32
Exp.No:10
Aim:-
To write a program for electricity bill preparation for the following datas:
Pseudo code:-
// Program:-
Result:-
33
Exp.No:11
Aim:-
x3 x5 x7 xn
s =x − + − ......
3! 5! 7! n!
//Algorithm:-
//Program:-
#include<conio.h>
#include<math.h>
void main()
{
double x=0.52;
double numerator = x;
double denominator = 1.0;
double sign = 1.0;
double sin = 0;
int i;
// terms below define the number of terms you want
int terms = 10;
for (i = 1 ; i <= 10 ; i++ )
{
sin += numerator / denominator * sign;
numerator *= x * x;
denominator *= i*2 * (i*2+1);
sign *= -1;
}
printf("Result=%f",sin);
Result:-
34
Exp.No:12
Aim:-
//Program:-
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i,n,x;
double t,s;
//clrscr();
printf("enter the value of k,n \n");
scanf("%d%d",&x,&n);
t=1;
s=1;
for(i=1;i<=n-1;i++)
{
t=(-1)*((pow(x,2)*t*i))/((2*i)*((2*i-1)*i));
s=s+t;
printf("s=%6.2f & t=%6.2f\n",s,t);
}
printf("\n sum of the cos series=%5.2f\n",s);
return(0);
}
Result:
35
Exp.No:13
Aim:-
// Program:-
Result:
36
Exp.No:14
Aim:-
//Program:-
Result:
37
Exp.No:15
Aim:-
To Write a C program to read a string, and find its length, and also copy it to another
string variable without using library functions.
// Program:-
#include <stdio.h>
#include <conio.h>
#include <string.h>
main( )
{ char st1[10], st2[10];
int l, i, j;
clrscr( );
printf (“\n Enter the string : “);
scanf (“%s”, st1);
/* Loop to find length of string */
l = 0;
i = 0;
while (st1[i] != ‘\ 0’)
{
l ++;
i++;
}
printf (“\n Length of string : %d”, l);
/* Loop to copy the string */
i = 0;
j = 0;
while (st1 [i] != ‘\ 0’;
{
st2 [j] = st1 [i];
i ++;
j ++;
}
st2 [j] = ‘ \ 0’;
printf (“\n The copied string : %s “, st2);
getch( );
}
Result:
38
Exp.No:16
Aim:-
// Program:-
#include <stdio.h>
#include <conio.h>
#include <string.h>
main()
{
char names[50] [20], temp[20];
int n,i,j;
printf(“\n How many names ? “);
scanf(“%d”, &n);
printf (“\n Enter the %d names one by one \n”);
for (i = 0; i < n; i++)
scanf (“%s”,names [i]);
Result:
39
Exp.No:17
Aim: -
// Program:-
#include <stdio.h>
#include <conio.h>
#include <math.h>
main( )
{ float x[10], xbar;
int n, i;
float amean(float x[], int, n);
float variance(float x[], int n, float xb);
printf(“\n How many values? : “);
scanf(“%d”, &n);
/* Loop to read all values */
printf(“\n Enter all values \n”);
for (i = 0; I < n; i ++)
scanf(“%f”, &x[i] );
/* Call function to print arithmetic mean */
xbar = amean(x, n);
printf(“\n Arithmetic mean = %6.3f ”, xbar);
printf(“\n Variance = %6.3f “ , variance(x, n, xbar);
printf(“\n Standard deviation = %6.3f “ , sqrt(variance (x, n, xbar) ) );
getch( );
}
40
Result:
Exp.No:18
Aim:-
// Program:-
#include <stdio.h>
#include <conio.h>
main( )
{
/* declaring a structure and an array */
struct student; { int rno; char sname[20] ; int tot ; } std[50] ;
if (flag == 0)
printf (“\n %d is not present in the list”, temp) ;
printf (“\n press y - to continue”) ;
printf (“\n any other key to stop.”) ;
ch = getch( ) ;
}
}
Result:
41
Exp.No:19
Aim:-
// Program:-
#include <stdio.h>
#include <string.h>
union Employee
{
int Empid;
char Name[20];
float Salary;
};
void main()
{
union Employee e1,e2,e3;
e1.Empid=1234;
strcpy(e2.Name,"Mr.M.Vivekanandan");
e3.Salary=12000.50;
printf("\n***************************************************************************\n");
printf("\nThe Employee Details are.......\n");
printf("\n***************************************************************************\n");
printf("\nEmpid=%d\nEmp Name=%s\nSalary=%f\n",e1.Empid,e2.Name,e3.Salary);
Result:-
42