0% found this document useful (0 votes)
3 views

c Lab Manual

The document is a lab manual for the C Programming and MS Office Tools course for first-year B.Tech students for the academic year 2023-2024. It includes a list of experiments covering various topics in C programming such as functions, structures, pointers, and algorithms, as well as MS Office tasks like creating newsletters and tables. Each experiment contains an aim, algorithm, flowchart, code, and expected output.

Uploaded by

babuap491
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

c Lab Manual

The document is a lab manual for the C Programming and MS Office Tools course for first-year B.Tech students for the academic year 2023-2024. It includes a list of experiments covering various topics in C programming such as functions, structures, pointers, and algorithms, as well as MS Office tasks like creating newsletters and tables. Each experiment contains an aim, algorithm, flowchart, code, and expected output.

Uploaded by

babuap491
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 100

FACULTY OF ENGINEERING AND TECHNOLOGY

I YEAR B.TECH (SEMESTER - I)

ACADEMIC YEAR 2023-2024

EBCS22ET1- C PROGRAMMING AND MS OFFICE TOOLS

LAB MANUAL

NAME:

ROLL NO:

COURSE:

YEAR /SEM:

1
List of Experiments

C PROGRAMMING

1. Find the factorial of a given positive number using function.


2. Calculate X raised to Y using function.
3. Find GCD and LCM of two given integer numbers using function.
4. Find the sum of N natural numbers using function.
5. Book information using structure.
6. Student information using structure.
7. Print the address of a variable and its value using Pointer.
8. Find area and perimeter of a circle.
9. Check whether the given number is palindrome or not.
10. Check whether the given number is prime or not.
11. Calculate sum of the digits of the given number.
12. Display Fibonacci series up to N terms.
13. Check whether a given character is alphabetic, numeric or special character.
14. Count vowels and consonants in a given string.
15. Find product of two matrices.

MS OFFICE TOOLS

16. Preparing a Newsletter : To prepare a newsletter with borders, two columns text, header and
footer, inserting a graphic image and page layout.
17. Creating and editing the table.
18. Printing envelopes and mail merge.
19. Using formulas and functions : To prepare a worksheet showing the monthly sales of a
company in different branch offices.
20. Prepare a statement for displaying result of 10 students in 5 subjects.

2
INDEX
PAGE SIGNATURE
SI. DATE EXPERIMENTS NO. OF THE
NO. STAFF

3
PAGE SIGNATURE
SI. DATE EXPERIMENTS NO. OF THE
NO. STAFF

4
C-PROGRAMMING

Date :

Exp. No:

Find the factorial of a given positive number using function.

Aim :
To write a C program to calculate the factorial of a given positive number using function.

Algorithm :
Step 1: Start
Step 2: Declare Variable n, fact, i
Step 3: Read number from User
Step 4: Initialize Variable fact=1 and i=1
Step 5: Repeat Until i<=number
fact=fact*i
i=i+1
Step 6: Print fact
Step 7: Stop

5
Flow Chart :

Start

Read n

i = 1 , fact = 1

is False
i<=n?

True

i=i+1
Print fact

Fact=fact*i

Stop

6
Code :

#include<stdio.h>
#include<conio.h>
int main()
{
int n,i,fact=1;
printf("Enter any number : ");
scanf("%d", &n);
for(i=1; i<=n; i++)
fact = fact * i;
printf("Factorial value of %d = %d",n,fact);
return 0;
}

7
Output :

Result :

8
Date :

Exp. No:

Calculate X raised to Y using function.

Aim : To write a C program to calculate X raised to Y using function.

Algorithm :
Step 1: Declare int and long variables.
Step 2: Enter base value through console.
Step 3: Enter exponent value through console.
Step 4: While loop.
Exponent !=0
Value *=base
–exponent
Step 5: Print the result.

9
Flow chart :

Start

Long value = 1

Enter Base &


Power value

if long False
value < Value*=base
power

No

Print output

Stop

10
Code :

#include<stdio.h>
int main()
{
int base, exponent;
long value = 1;
printf("Enter a base value:");
scanf("%d", &base);
printf("Enter an exponent value: ");
scanf("%d", &exponent);
while (exponent != 0)
{
value *= base;
--exponent;
}
printf("Result = %ld", value);
return 0;
}

11
Output :

Result :

12
Date :
Exp. No:

Find GCD and LCM of two given integer numbers using function.

Aim :
To write a C program to find GCD and LCM of two given integer numbers using function.

Algorithm :

Step-1 : Input two integer numbers.

Step-2 : Compare the two numbers, store the greater number in the numerator and the
smaller number in the denominator.

Step-3 : Run the while loop until the remainder becomes ‘0’.

Step-4 : Inside the while loop keep on dividing the numerator by denominator and store
the value in the remainder variable.

Step-5 : When the value of the remainder variable becomes ‘0’ come out of the loop and
store the value of the denominator in the GCD variable.

Step-6 : Now, calculate the lcm by the formula LCM = (num1 * num2) / GCD

Step-7 : Print the value of GCD and LCM.

13
Flow chart :

14
Code :

#include <stdio.h>
void main()
{
int num1, num2, gcd, lcm, remainder, numerator, denominator;

printf("Enter two numbers:\n");


scanf("%d %d", &num1, &num2);

numerator = (num1>num2)?num1:num2;
denominator = (num1<num2)?num1:num2;
remainder = numerator % denominator;

while (remainder != 0)
{
numerator = denominator;
denominator = remainder;
remainder = numerator % denominator;
}
gcd = denominator;
lcm = num1 * num2 / gcd;
printf("GCD of %d and %d = %d\n", num1, num2, gcd);
printf("LCM of %d and %d = %d\n", num1, num2, lcm);
}

15
Output :

Result :

16
Date :

Exp. No:

Find the sum of N natural numbers using function.

Aim :
To write a C program to find the sum of N natural numbers using function.

Algorithm :

Step –1 : Start

Step –2 : Declare and initialize variable, i,num, s=0.

Step –3 : Enter the value of num i.e. number upto which sum is to be calculated.

Step –4 : Print the sum

Step –5 : Stop.

17
Flow chart :

18
Code :

#include <stdio.h>
#include <conio.h>
void main()
{
int num, i, sum = 0;
printf(" Enter a positive number: ");
scanf("%d", &num);
for (i = 0; i <= num; i++)
{
sum = sum + i;
}

printf("\n Sum of the first %d number is: %d", num, sum);


getch();
}

19
Output :

Result :

20
Date :

Exp. No:

Book information using Structure.

Aim :
To write a C program for book information using structures method.

Algorithm :

Step -1 : Input structure definition.

Step -2 : Enter size of the book details to be stored.

Step -3 : Enter details of each book with name, author, pages & price.

Step -4 : Get the total book details.

Step -5 : Stop

Flow chart :

21
Code :

#include<stdio.h>
#include<string.h>
#define SIZE 20

struct bookdetail
{
char name[20];
char author[20];
int pages;
float price;

};

void output(struct bookdetail v[],int n);

void main()
{
struct bookdetail b[SIZE];

int num,i;
printf("Enter the Numbers of Books:");
scanf("%d",&num);
printf("\n");
for(i=0;i<num;i++)

printf("\t=:Book %d Detail:=\n",i+1);

printf("\nEnter the Book Name:\n");


scanf("%s",b[i].name);

printf("Enter the Author of Book:\n");


scanf("%s",b[i].author);

printf("Enter the Pages of Book:\n");


scanf("%d",&b[i].pages);

22
printf("Enter the Price of Book:\n");
scanf("%f",&b[i].price);

output(b,num);

void output(struct bookdetail v[],int n)

int i,t=1;

for(i=0;i<n;i++,t++)

printf("\n");

printf("Book No.%d\n",t);

printf("\t\tBook %d Name is=%s \n",t,v[i].name);

printf("\t\tBook %d Author is=%s \n",t,v[i].author);

printf("\t\tBook %d Pages is=%d \n",t,v[i].pages);

printf("\t\tBook %d Price is=%f \n",t,v[i].price);

printf("\n");

23
Output :

Result :

24
Date :

Exp. No:

Student information using structure.

Aim :
To write a C program to store student information using structures.

Algorithm :

Step -1 : Input structure definition.

Step -2 : Enter size of the student details to be stored.

Step -3 : Enter details of each book with name, register no and marks.

Step -4 : Get the total student details.

Step -5 : Stop

25
Flow chart :

26
Code :

#include <stdio.h>
struct student
{
char name[50];
int roll;
float marks;
};
int main()
{
struct student s;

printf("Enter The Information of Students :\n\n");

printf("Enter Name : ");


scanf("%s",s.name);

printf("Enter Roll No. : ");


scanf("%d",&s.roll);

printf("Enter marks : ");


scanf("%f",&s.marks);

printf("\nDisplaying Information\n");

printf("Name: %s\n",s.name);
printf("Roll: %d\n",s.roll);
printf("Marks: %.2f\n",s.marks);
return 0;
}

27
Output :

Result :

28
Date :

Exp. No:

Print the address of a variable and its value using Pointer.

Aim :
To write a C program to print the address of a variable and its value using pointer.

Algorithm :

Step -1 : A pointer is a variable that contains the address of another variable.

Step -2 : Pointer’s were declared using asterisk ( * ) symbol.

Step -3 : Input variable var and pointer *ptr data types.

Step -4 : Enter the variable value.

Step -5 : Stop

29
Flow chart :
Start

Float var , *ptr

Input var

Print var

Print ptr = var


address

Stop

30
Code :

#include<stdio.h>

int main()
{

float var, *ptr;

var = 23.32;

ptr = &var;

printf("Address of var without using pointer = %u\n", &var);


printf("Value of var = %f\n", *ptr);
printf("Address of var using pointer = %u\n", ptr);

return 0;
}

31
Output :

Result :

32
Date :

Exp. No:

Area and perimeter of a circle.

Aim : To write a C program to find the area and perimeter of a circle.

Algorithm :

Step 1: Start

Step 2: input r

Step 3: let pi = 3.14

Step 4: area = pi * r * r

Step 5: Perimeter = 2 * pi * r

Step 6: print area, perimeter.

Step 7: Stop

33
Flow chart :

34
Code :

#include<stdio.h>
void main()
{
float radius, area, p;
printf("Enter Radius of Circle\n");
scanf("%f",&radius);

area=3.14*radius*radius;
printf("The area of Circle is %f",area);

p=2*3.14*radius;
printf("\nThe perimeter of Circle is %f",p);
}

35
Output :

Result :

36
Date :

Exp. No:

Check whether the given number is palindrome or not.

Aim :

To write a C program to check whether the given number is palindrome or not.

Algorithm :

Step -1: Input a number from user.

Step -2: Store it in variable say num.

Step -3: Find reverse of the given number.

Step -4: Store it in variable say reverse.

Step -5: Compare num with reverse.

Step -6: If both are same then the number is palindrome otherwise not.

37
Flow chart :

38
Code :

#include <stdio.h>
int main() {
int n, reversed = 0, remainder, original;
printf("Enter an integer: ");
scanf("%d", &n);
original = n;

while (n != 0) {
remainder = n % 10;
reversed = reversed * 10 + remainder;
n /= 10;
}

if (original == reversed)
printf("%d is a palindrome.", original);
else
printf("%d is not a palindrome.", original);

return 0;
}

39
Output :

Result :

40
Date :

Exp. No:

Check whether the given number is prime or not.

Aim :

To write a C program to check whether the given number is prime or not.

Algorithm :
Step -1: Take num as input.

Step -2: Initialize a variable temp to 0.

Step -3: Iterate a “for” loop from 2 to num/2.

Step -4: If num is divisible by loop iterator, then increment temp.

Step -5: If the temp is equal to 0, Return “Num is PRIME”.

Step -6: Else, Return “Num IS NOT PRIME”.

41
Flow chart :

42
Code :

#include <stdio.h>

int main()
{

int n, i, flag = 0;
printf("Enter an integer: ");
scanf("%d", &n);

if (n == 0 || n == 1)
flag = 1;

for (i = 2; i <= n / 2; ++i)


{

if (n % i == 0) {
flag = 1;
break;
}
}

if (flag == 0)
printf("%d is a prime number.", n);
else
printf("%d is not a prime number.", n);

return 0;
}

43
Output :

Result :

44
Date :

Exp. No:

Calculate sum of the digits of the given number.

Aim :

To write a C program to calculate sum of the digits of the given number.

Algorithm :

Step -1: Enter a number digit

Step -2: Get the modulus/remainder of the number

Step -3: sum the remainder of the number

Step -4: Divide the number by 10

Step -5: Repeat the step 2 while number is greater than 0

45
Flow chart :

46
Code :

#include <stdio.h>

int main()
{
int num, sum=0;

printf("Enter any number to find sum of its digit: ");


scanf("%d", &num);

while(num!=0)
{

sum += num % 10;

num = num / 10;


}

printf("Sum of digits = %d", sum);

return 0;
}

47
Output :

Result :

48
Date :

Exp. No:

Display Fibonacci series up to N terms.

Aim :
To write a C program to display Fibonacci series up to N terms.

Algorithm :

Step -1: Input number of Fibonacci terms to print.

Step -2: Declare and initialize three variables, a=0, b=1, c=0.

Step -3: Here c is the current term, b is the n-1th term and a is n-2th term.

Step -4: Run a loop from 1 to terms, increment loop counter by 1.

Step -5: The loop structure should look like for(i=1; i<=term; i++).

Step -6: |It will iterate through n terms.

Step -7: Inside the loop copy the value of n-1th term to n-2th term i.e. a=b.

Step -8: Next, copy the value of nth to n-1th term b=c

Step -9: Finally compute the new term by adding previous two terms i.e. c = a+b.

Step -10: Print the value of current Fibonacci term i.e. c

49
Flow chart :

50
Code :

#include <stdio.h>

int main()
{
int a, b, c, i, terms;

printf("Enter number of terms: ");


scanf("%d", &terms);

a = 0;
b = 1;
c = 0;

printf("Fibonacci terms: \n");

for(i=1; i<=terms; i++)


{
printf("%d, ", c);

a = b;
b = c;
c = a + b;
}

return 0;
}

51
Output :

Result :

52
Date :

Exp. No:

Check whether a given character is alphabetic, numeric or special character.

Aim :

To write a C program to check whether a given character is alphabetic, numeric or special


character.

Algorithm :

Step -1: Input a character.

Step -2: First check if character is alphabet or not

Step -3: A character is alphabet if ((ch >= ‘a’ && ch <= ‘z’ ) || (ch >= ‘A’ && ch <= ‘Z’ ))

Step -4: Next, check condition for digits.

Step -5: A character is digit if (ch >= ‘0’ && ch <= ‘9’ )

Step -6: Finally, if a character is neither alphabet nor digit, then character is a special character.

53
Flow chart :

Start

Input character

Ch=’A’&
&’Z’, Print alphabet
’a’&&’z’

Ch >=
'0' &&
ch <= '9'
Print numeric

Else
Special
character

Print special character

Stop

54
Code :

#include <stdio.h>

int main()
{
char ch;

printf("Enter any character: ");


scanf("%c", &ch);

if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
{
printf(“%c' is alphabet.", ch);
}
else if(ch >= '0' && ch <= '9')
{
printf("%c' is numeric.", ch);
}
else
{
printf("%c' is special character.", ch);
}

return 0;
}

55
Output :

Result :

56
Date :

Exp. No:

Count vowels and consonants in a given string.

Aim :
To write a C program to count vowels and consonants in a given string.

Algorithm :

Step -1: Input string of content.

Step -2: Initialize two other variables to store vowel and consonant count.
Vowel = 0 and consonant = 0

Step -3: Run a loop from start till end of string.

Step -4: Inside the loop increment vowel by 1 if current character is vowel.

Step -5: Otherwise increment consonant by 1 if current character is consonant.

57
Flow chart :

Start

Declare var ch

False Count consonants

True
Count vowels

print

Stop

58
Code :

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#define str_size 100

void main()
{
char str[str_size];
int i, len, vowel, cons;

printf("Enter a string : ");


fgets(str, sizeof str, stdin);

vowel = 0;
cons = 0;
len = strlen(str);

for(i=0; i<len; i++)


{

if(str[i] =='a' || str[i]=='e' || str[i]=='i' || str[i]=='o' || str[i]=='u' || str[i]=='A' || str[i]=='E' ||


str[i]=='I' || str[i]=='O' || str[i]=='U')
{
vowel++;
}
else if((str[i]>='a' && str[i]<='z') || (str[i]>='A' && str[i]<='Z'))
{
cons++;
}
}
printf("\nThe total number of vowel in the string is : %d\n", vowel);
printf("The total number of consonant in the string is : %d\n\n", cons);
}

59
Output :

Result :

60
Date :

Exp. No:

Find product of two matrices.

Aim :
To write a C program to find product of two matrices.

Algorithm :

Step -1: Declare and initialize two two-dimensional arrays a and b.

Step -2: Calculate the number of rows and columns present in the array a and store it in
variables row1 and col1 respectively.

Step -3: Calculate the number of rows and columns present in the array b and store it in
variables row2 and col2 respectively.

Step -4: Check if col1 is equal to row2. For two matrices to be multiplied, the number of
column in the first matrix must be equal to the number of rows in the second matrix.

Step -5: If col1 is not equal to row2, display the message "Matrices cannot be
multiplied."

Step -6: If they are equal, loop through the arrays a and b by multiplying elements of the
first row of the first matrix with the first column of the second matrix and add all the
product of elements.
e.g prod11 = a11 x b11 + a11 x b21 + a11 x b31

Step -7: Repeat the previous step till all the rows of the first matrix is multiplied with all
the columns of the second matrix.

61
Flow chart :

62
Code :

#include <stdio.h>
const int MAX = 100;

void printMatrix(int M[][MAX], int rowSize, int colSize)


{
for (int i = 0; i < rowSize; i++) {
for (int j = 0; j < colSize; j++)
printf("%d ", M[i][j]);

printf("\n");
}
}

void multiplyMatrix(int row1, int col1, int A[][MAX],int row2, int col2, int B[][MAX])
{
int i, j, k;

int C[MAX][MAX];

if (row2 != col1) {
printf("Not Possible\n");
return;
}

for (i = 0; i < row1; i++) {


for (j = 0; j < col2; j++) {
C[i][j] = 0;
for (k = 0; k < row2; k++)
C[i][j] += A[i][k] * B[k][j];
}
}

printf("\nResultant Matrix: \n");


printMatrix(C, row1, col2);
}

int main()
{
int row1, col1, row2, col2, i, j;
int A[MAX][MAX], B[MAX][MAX];

63
printf("Enter the number of rows of First Matrix: ");
scanf("%d", &row1);
printf("%d", row1);
printf("\nEnter the number of columns of First Matrix: ");
scanf("%d", &col1);
printf("%d", col1);

printf("\nEnter the elements of First Matrix: ");


for (i = 0; i < row1; i++) {
for (j = 0; j < col1; j++) {
printf("\nA[%d][%d]: ", i, j);
scanf("%d", &A[i][j]);
printf("%d", A[i][j]);
}
}
printf("\nEnter the number of rows of Second Matrix: ");
scanf("%d", &row2);
printf("%d", row2);
printf("\nEnter the number of columns of Second Matrix: ");
scanf("%d", &col2);
printf("%d", col2);

printf("\nEnter the elements of First Matrix: ");


for (i = 0; i < row2; i++) {
for (j = 0; j < col2; j++) {
printf("\nB[%d][%d]: ", i, j);
scanf("%d", &B[i][j]);
printf("%d", B[i][j]);
}
}
printf("\n\nFirst Matrix: \n");
printMatrix(A, row1, col1);

printf("\nSecond Matrix: \n");


printMatrix(B, row2, col2);

multiplyMatrix(row1, col1, A, row2, col2, B);

return 0;
}

64
Output:

Result :

65
66
MS-OFFICE

Date :

Exp. No:

Preparing a Newsletter : To prepare a newsletter with borders, two


columns text, header and footer, inserting a graphic image and page layout.

Aim :
To prepare a newsletter with borders, two columns text, header and footer and inserting a
graphic image and page layout.

Procedure :
Step-1 : Create a New page.

Click on Home → New or Press Ctrl+N

67
Step–2 : To create borders.

• Click on Design → Select Page Border → Choose the required border style and
click OK.

• The border appears like the below figure.

68
Step – 3 : To create a two column text.

• Enter the required contents in the page.

• Select the required text to be represented as two column text.


• Click on Page layout → Columns → Click on Two.

69
• Your page looks like the below figure.

Step – 4 : Inserting Header and Footer :

Header :

• Click on Insert → Header →Select the required header style.

70
• Give the required data like Date, Article name & Place.

Footer :

• Click on Insert → Footer →Select the required footer style.

71
• Give page number and the page looks like the below figure.

Step – 5 : Insert a graphic image :

• Place the cursor were you need to place the graphic image.
• Click on Insert → Pictures.

72
• Select the required image and click on insert.

• Your page will look like the below figure.

73
Step – 6 : Page Layout.

• Click on Page layout.

• Here you can set margins, apply themes, control of page orientation and size, add
sections and line breaks, display line numbers, and set paragraph indentation and lines.

Result :

74
Date :

Exp. No:

Creating and editing the table.

Aim :
To create a table and edit the table in MS Office.

Procedure :
Step - 1 : To create a new table :

§ Move the cursor to the location in the document where you want to create the
table.
§ Click the Table button in the Elements tool or choose Insert → click Table. The
table dialog displays
§ Enter the initial number of rows and columns for the new table and specify the
border width.

75
§ Click the confirm button.
§ The table is created successfully.

Step – 2 : Editing the table.

• Enter the required data in the new table.

76
Add rows and columns :

§ Place the cursor were you want to edit the table.


§ Right-Click on the cell. Dialog box appears.
§ Click on insert option.
§ It shows various options like :
Ø Insert column left.
Ø Insert column right.
Ø Insert row above.
Ø Insert row below.

• You can add the number of rows and columns by selecting the options in the dialog box.

77
Step – 3 : Deleting the table.

§ Place the cursor were you want to delete the table.


§ Right-Click on the cell. Dialog box appears.
§ Click on delete option.
§ It shows various options like :
Ø Delete cell
Ø Delete row
Ø Delete column
Ø Delete table

Result :

78
Date :

Exp. No:

Printing envelopes and mail merge.

Aim :
To create an envelope and mail merge the envelope using MS Office.

Procedure :

Creating Envelope :
Step – 1 :

§ Open MS Word, create new page.


§ Click on Mailing → Envelopes. Envelopes and Labels dialog box appears.

Step – 2 :

§ Entering the address details.


§ Enter both delivery address and return address.

79
Step – 3 :

After entering the address click on Add to Documents option.

Your envelope is successfully created and you can print the envelope.

80
Mail Merge :
Mail Merge is a handy feature that incorporates data from both Microsoft Word and Microsoft
Excel and allows you to create multiple documents at once, such as letters, saving you the time
and effort of retyping the same letter over and over.

Step – 1:

Gathering Your Data :

§ The first thing you do is create an Excel spreadsheet, creating a header for each field such
as First Name, Last Name, Address & City.

§ Save the spreadsheet.


§ Open MS-Word and type-in the required letter content without address.
§ Save the word document.

81
Step – 2 :

Click on Mailing → Select Start Mail Merge → Click on Step-by-Step-Mail-Wizard option.

Step – 3 :

The Mail merge wizard box appears.

It has 6 steps to complete the process.

i. Select the document type :


• Select “Letters” option.
• Click on next option.

ii. Select starting document :


• Select “use the current document” option.

82
• Click on next option.

iii. Select recipients :


• Select “Use an existing list” option.
• Open the saved Excel spreadsheet.

• Select the mail merge recipients list.

83
• Click on next option.

iv. Write your letter :

• Click on “Address book” option.


• Insert address block dialog box appears.
• Select a recipient name and click OK.

• Then address block tag appears on the letter.

84
• Click on “Greeting Line” option.
• Insert greeting line dialog box appears.
• Select a greeting line format and click OK.

• Then the greeting line tag appears on the letter.

85
• Click on next option.

v. Preview your letter :

• Preview of the selected recipient name address and greeting line were attached
to the letter.

• Click on next option.

86
vi. Complete the merge :

• Merge to printer dialog box appears.


• Select All option and click OK.

87
Result :

88
Date :

Exp. No:

Prepare a worksheet showing the monthly sales of a company to different


branch offices.

Aim :
To prepare a worksheet showing the monthly sales of a company to different branch offices
using formulas and functions.

Procedure :

Step – 1 :

Create basic information :

• To write the company name in larger word within a single cell, select the space you
need.
• Click on Merger and Center option.

• The Space will be allocated.


• Type the required information.

89
Step – 2 :

Formula for multiplication :

( Formula = First cell name * Second cell name )

• Select the cell were you want to do the function.


• For multiplying two or more value use the symbol asterisk ( * )
• Select the cell E6 and type the formula as =C6*D6
• Then press Enter key for answer.

90
• To fill other cell with the same multiplication operation, drag the cell pointer downwards.
• The auto-fill option will take care of doing the remaining cell calculations immediately.

Step – 3 :

Formula for percentage :

( Formula = Cell name * percentage value % )

• Select the cell were you want to do the function.


• For percentage use the symbol asterisk ( * ) and percentage ( % )
• If you want to find 5 percentage of the given value, then

91
• Select the cell F6 and type the formula as =E6*5%
• Then press Enter key for answer.

92
Step – 4 :

Formula for addition :

[ Formula = SUM(first cell name , Second cell name )]

OR

( Formula = First cell name + Second cell name )

• Select the cell were you want to do the function.


• For multiplying two or more value use the symbol ( + )
• Select the cell G6 and type the formula as =SUM(E6,F6) or =E6+F6
• Then press Enter key for answer.

93
Result :

94
Date :

Exp. No:

Prepare a statement for displaying result of 10 students in 5 subjects.

Aim :
To prepare a statement for displaying result of 10 students in 5 subjects.

Procedure :
Step – 1 :

• Create a worksheet with 10 students name and marks obtained by them in 5 subjects.

Step – 2 :

Formula for marks obtained.

[(Formula = SUM(First cell name,Second cell name, Third cell name)]

( Formula = First cell name + Second cell name + Third cell name )

• Select the cell were you want to do the function.


• For multiplying two or more value use the symbol ( + )

95
• Select the cell G6 and type the formula as =SUM(B2,C2,D2,E2,F2) or
=b2+C2+D2=E2+F2.
• Then press Enter key for answer.

96
Step – 3 :

Formula for percentage.

( Formula = Cell name * percentage value % )

• Select the cell were you want to do the function.


• For percentage use the symbol asterisk ( * ) and percentage ( % )
• If the total mark is 500 marks, then
• Select the cell F6 and type the formula as =H2*100/G2
• Then press Enter key for answer.

97
Step – 4 :

Formula for Grade :

• Select the cell were you want to do the function.


• For grade we must assign greater than or lesser than symbols.
• Select the cell J2 and type the formula as
=IF(I2>=90,"A",IF(I2<=90,"B",IF(I2<=80,"C",IF(I2<=70,"D",IF(I2<=60,"E")))))
• Then press Enter key for answer.

98
Result :

99
100

You might also like