Академический Документы
Профессиональный Документы
Культура Документы
Aim:
Create the document containing the text given below, and perform the following tasks:
Procedure:
1.Open a new document using File -> New option and type text. For Justification
select the entire text in the document. Then press CTRL+J or select the Justify
button on the formatting tool bar.
2.Select the word you want to change into bold face. Then press CTRL+B or select the
Bold button on the formatting tool bar.
3.For Spelling corrections, select the word you want to correct, then right click the
mouse or click Spelling and Grammar button on the standard tool bar.
4.Select the word which you want to make Italic style then press CTRL+I or select the
Italic button on the formatting tool bar. For Underline press CTRL+U or select the
Underline button on the formatting tool bar.
5.For saving the document, press CTRL+S or click on Save button on Standard tool
bar or select the Save option from the File menu. Then it shows the Save As dialog
box. Choose a suitable file name in File Name text box, then click Save button on
Save As dialog box.
Output:
Result:
Thus the document created using MS – WORD and Text manipulation done
successfully.
Ex.No: 1.2 Table Creation and Table formatting
Date :
Aim:
Creating Table with sample data and formatting table using Table Properties.
Procedure:
Result:
Thus the document created using MS – WORD and Text manipulation done
successfully.
Ex.No: 1.3 Mail Merge for sending Resume
Date :
Aim:
To create a Mail Merge for sending the Bio – Data.
Procedure:
From
Xxxx,
Maamallan Nagar,
Vadamangalam,
Chennai.
To
Ramesh babu
tcs
73,S.N Chetty st
Chennai - 6000081
TamilNadu
Bio – Data
Name : XXXX
D.O.B : 23-jul-1988
State : TamilNadu
Country : India
Result:
Thus the document created using MS – WORD and Mail – Merge is done successfully.
Aim:
Draw a flowchart for calculating simple interest.
Procedure:
Output:
START
READ P, N, R
SI = P*N*R/100
WRITE SI
STOP
Result:
Thus the document created using MS – WORD and flow chart is sketched successfully.
Ex.No: 2.1 Creating chart using MS - Excel
Date :
Aim:
Creating different type of Chart based on the sample data using MS –Excel.
The ABC Company the sales of different products for 5 years. Create Line, XY, Bar
and Pie chart for the following.
Procedure:
1. Type the data as shown in the worksheet.
2. Click at cell address A1, click Insert -> Chart.
3. Excel will display the first dialog box of Chart Wizard.
4. Select Graph type and click on Next.
5. Click on Data Range from the Chart Wizard dialog box.
6. Select A1 to E6, then click Next.
7. Click in the chart title box, type ABC – COMPANY.
8. Click on the Category X-Axis, type YEAR
9. Click on the Value Y-Axis type PRODUCT
10. Click Next, then click FINISH
11. Excel will display the created chart in the current worksheet.
Output:
ABC- COMPANY
100%
PRODUCT
80% Series5
Series4
60%
Series3
40%
Series2
20% Series1
0%
1 2 3 4 5
YEAR
ABC - COMPANY
1200
PRODUCT
1000
Series1
800
Series2
600
Series3
400
Series4
200
0
1998 2000 2002 2004 2006
YEAR
ABC- COMPANY
5
PRODUCT
Series1
4 Series2
3 Series3
2 Series4
Series5
1
1
2
3
4
5
Aim:
Calculate HRA, DA, TA, PF, LIC, Gross Salary, Deductions, Net salary from given
data in a worksheet.
Where
HRA is 18% of BASIC
DA is 15% of BASIC
TA is 12% of BASIC
PF is 10% of BASIC
LIC is 7% of BASIC
GS (Gross Salary) = BASIC + HRA + DA + TA
DED (Deductions) = PF + LIC
NS (Net Salary) = GS – DED
Procedure:
1. For HRA put the cell pointer in D3 and press = (equal to) for entering the
formula. Then choose the C3 cell (Basic Salary) and type * (multiplication
operator) and type 18% then press enter.
2. Then drag that formula for entire records.
3. For TA put the cell pointer in E3 and press = (equal to) for entering the
formula. Then choose the C3 cell (Basic Salary) and type * (multiplication
operator) and type 15% then press enter.
4. Then drag that formula for entire records.
5. Follow the above steps for calculation of DA, PF, LIC.
6. For GS (Gross Salary) put the cell pointer in I3 and choose the = , then click on C3
cell + click on D3 + click on E3 + click on F3 and press enter.
7. Drag all the cell
8. Follow the above step for DED and NS calculation.
Output:
Result:
Thus the excel sheet created using MS – EXCEL formula bar, the HRA and DA
calculated Successfully.
Ex.No: 2.3 MS-Excel - Inserting Object in MS-Excel
Date :
Aim:
i. Insert object in the worksheet
ii. Insert picture in the worksheet
iii. Protect a sheet
Procedure:
1. To enter Microsoft Excel, Click “start” button then click “program” from “programs”
menu then click “Microsoft Excel”
2. For opening a word document do the following. Click “file” menu from the menu bar.
From this file menu click “new” option. This will display the new work sheet.
3. For inserting object in the worksheet, choose objects option in the insert menu
4. For inserting picture in the worksheet, choose Picture option in the insert menu
5. For protecting your worksheet, choose Protection option from Tools menu, then choose
Protect Sheet option, Protect sheet dialog box appears. Type a password and press
enter.
6. Now your worksheet is protected and can be entered only with the password.
Output:
Result:
Thus the excel sheet created using MS – EXCEL , the object and picture inserted
Successfully.
Ex.No: 3 Write a simple C program for menu driven calculator using switch statement
Date :
Aim:
To write a menu driven program to find
1. Factorial of the given number
2. Prime number or not
3. Even number or Odd number
4. Exit
Algorithm:
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,n;
clrscr();
printf("--MENU--");
printf("\n1.Addition\n2.Subtraction\n3.Multiply\n4.Division\n0.Exit");
printf("\nEnter your choice:");
scanf("%d",&n);
if(n<=4&n>0)
{
printf("\nEnter two numbers:");
scanf("%d%d",&a,&b);
}
switch(n)
{
case 1:
c=a+b;
printf("Addition :%d",c);
break;
case 2:
c=a-b;
printf("Subtraction :%d",c);
break;
case 3:
c=a*b;
printf("Multiplication :%d",c);
break;
case 4:
c=a/b;
printf("Division :%d",c);
break;
case 0:
exit(0);
break;
default:
printf("Invalid choice");
}
getch();
}
Output:
--MENU--
1.Addition
2.Subtraction
3.Multiply
4.Division
0.Exit
Enter your choice:3
Aim:
To write a program to find whether the number is prime or not.
Algorithm:
#include<stdio.h>
#include<conio.h>
void main()
{
int num,i=2;
clrscr();
printf("Enter the number :");
scanf("%d",&num);
while(i<=num-1)
{
if(num%i==0)
{
printf("The given number is not a prime number");
break;
}
i++;
}
if(i==num)
{
printf("The given number is a prime");
}
getch();
}
Output:
Aim:
To write a program to generate the Fibonacci series
Algorithm:
#include<stdio.h>
#include<conio.h>
void main()
{
int num,fib=0,a=0,b=1,i;
clrscr();
printf("Enter the number :");
scanf("%d",&num);
printf("\nFIBONACCI SERIES\n");
if(num==0)
printf("0");
else
{
for(i=0;i<num;i++)
{
fib=fib+a;
a=b;
b=fib;
printf("%d\n",fib);
}
}
getch();
}
Output:
FIBONACCI SERIES
0
1
1
2
3
Ex.No: 6 Write a simple C program to find Palindrome or Not
Date :
Aim:
To find sum of Digits, Reverse and the given Number is Palindrome or not.
Algorithm:
#include<stdio.h>
main()
{
unsigned long int a,num,sum=0,rnum=0,rem;
printf(“\nEnter the number...”);
scanf(“%ld”,&num);
a=num;
while(num!=0)
{
rem=num%10;
sum=sum+rem;
rnum=rnum*10+rem;
num=num/10;
}
printf(“\nThe sum of the digits of %ld is %ld\n”,a,sum);
printf(“\nThe reverse number of the %ld is %ld”,a,rnum);
if(a==rnum)
printf(“\nThe given number is a palindrome”);
else
printf(“\nThe given number is not a palindrome”);
}
Output:
Aim:
To write a program to find the string length without using String
function.
Algorithm:
#include<stdio.h>
#include<conio.h>
void main()
{
char str[40];
int len;
clrscr();
printf("Enter the string :");
scanf("%s",str);
for(len=0;str[len]!='\0';len++);
printf("Length of the string :%d",len);
getch();
}
Output:
Aim:
To write a program to multiply two matrixes.
Algorithm:
#include<stdio.h>
#include<conio.h>
void main()
{
int a[25][25],b[25][25],c[25][25],i,j,k,r,s;
int m,n;
clrscr();
printf("Enter the no.of rows and column of A matrix :");
scanf("%d%d",&m,&n);
printf("\nEnter the no.of rows and column of B matrix :");
scanf("%d%d",&r,&s);
if(m!=r)
printf("\nThe matrix cannot multiplied");
else
{
printf("\nEnter the elements of A matrix :\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
scanf("%d",&a[i][j]);
}
printf("\nEnter the elements of B matrix :\n");
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
scanf("%d",&b[i][j]);
}
printf("The multiplication of two matrixes :\n");
for(i=0;i<m;i++)
{
printf("\n");
for(j=0;j<n;j++)
{
c[i][j]=0;
for(k=0;k<m;k++)
c[i][j]=c[i][j]+a[i][k]*b[k][j];
printf("\t%d",c[i][j]);
}
}
}
getch();
}
Output:
30 36 42
66 81 96
102 126 150
Ex.No: 9 Write a simple C program to arrange the Numbers in ascending order
Date :
Aim:
To write a program to print the ascending of the given array.
Algorithm:
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,n;
float a[50],temp;
clrscr();
printf("Enter the number how many number you want to sort\n");
scanf("%d",&n);
for(i=0;i<n-1;i++)
for(j=i+1;j<n;j++)
{
if(a[i]>a[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
for(i=0;i<n;i++)
{
printf("%.2f\n",a[i]);
}
getch();
}
Output:
Aim:
To write a program to find the factorial of the given number using recursion
Algorithm:
#include<stdio.h>
#include<conio.h>
int rec(int);
void main()
{
int a;
clrscr();
printf("Enter the number :");
scanf("%d",&a);
printf("The factorial of %d = %d",a,rec(a));
getch();
}
int rec(int x)
{
int f;
if(x==1)
return(1);
else
f=x*rec(x-1);
return(f);
}
Output:
Aim:
Algorithm:
#include<stdio.h>
#include<conio.h>
int cube(int);
void main()
{
int a;
clrscr();
printf("Enter the value :");
scanf("%d",&a);
printf("The value of cube is %d",cube(a));
getch();
}
int cube(int x)
{
int c;
c=x*x*x;
return(c);
}
Output:
Aim:
Algorithm:
#include<stdio.h>
#include<conio.h>
int swap(int*,int*);
void main()
{
int a,b;
clrscr();
printf("Enter the value of a and b:");
scanf("%d%d",&a,&b);
swap(&a,&b);
printf("After swapping a=%d\tb=%d\n",a,b);
getch();
}
int swap(int *x,int *y)
{
int t;
t=*x;
*x=*y;
*y=t;
return(0);
}
Output:
Aim:
To write a program to print the student name, roll no, average mark and their grades.
Algorithm:
#include<stdio.h>
main()
{
struct student
{
char name[25];
char regno[25];
int avg;
char grade;
} stud[50],*pt;
int i,no;
printf(“Enter the number of the students...”);
scanf(“%d”,&no);
for(i=0;i<no;i++)
{
printf(“\n student[%d] information:\n”,i+1);
printf(“Enter the name”);
scanf(“%s”,stud[i].name);
printf(“\nEnter the roll no of the student”);
scanf(“%s”,stud[i].regno);
printf(“\nEnter the average value of the student”);
scanf(“%d”,&stud[i].avg);
}
pt=stud;
for(pt=stud;pt<stud+no;pt++)
{
if(pt->avg<30)
pt->grade=’D’;
else if(pt->avg<50)
pt->grade=’C’;
else if(pt->avg<70)
pt->grade=’B’;
else
pt->grade=’A’;
}
printf(“\n”);
printf(“NAME REGISTER-NO AVERAGE GRADE\n”);
for(pt=stud;pt<stud+no;pt++)
{
printf(“%-20s%-10s”,pt->name,pt->regno);
printf(“%10d \t %c\n”,pt->avg,pt->grade);
}
}
Output: