Word and Basic c Programs
Word and Basic c Programs
Aim
Procedure
1. To enter Microsoft word, Click “start” button then click “program” then click “Microsoft
word”
2. Open a new document using File->New option and type text.
3. To add Header and footer click “view” menu, from this click “header and footer” option.
4. Then enter the heading in the header portion and change the “font size” to big size and
then click “B” button on formatting tool bar so that the header appears bold.
5. Then type the letter. Use Justify alignment from home menu to align letter.
6. Then save the document.
Result:
OutPut
From: Nagercoil
S.Neha, 12/08/15
I Sem BE, C Section,
University College of Engineering, Nagercoil,
Konam
To:
The Dean,
University College of Engineering, Nagercoil,
Konam
Respected Sir,
Sub : Applying for Leave
As I am going to attend my uncle’s marriage on 15-08-15 in Trichy , I kindly request you to
grant me leave for one day.
Thanking you,
Yours Sincerely,
S.Neha
EX.NO : 01 (b)
CREATION OF AN ADVERTISEMENT IN MS-WORD
DATE :
Aim:
Procedure:
Result:
Thus the advertisement is created in MS-Word using various drawing tools.
Output:
ASSET VERFICATION
PRE & POST MATRIMONIAL VERFICATION
PRE & POST EMPLOYMENT SCREENING
SHADOWING OF PERSONS
UNDER COVER SERVICE
HANDWRITING AND DOCUMENT ANALYSIS
FINGER PRINT COMPARSION
15 YEARS
OF EXP. 100%
SECURITY
ASSURED
FORENSIC LAB ATTACHED
DETECTIVE COURSES OFFERED
Aim
To Create a MS-word document with the given formulas and scientific notations
Procedure
1. To create formulae and equations select “Insert” option from the menu bar.
2. From insert menu choose “Equations” option and select “Insert New Equation”
3. Enter the equation in the document.
4. From design menu choose the structure what we want to use in equation
5. Save the document
Output
Aim:
To create the table, format the table and do table conversion.
Procedure:
1) Create the Time Table of your class
2) Create a table with the following Columns and display the results in separate cells for the
following
1.Student Name
2.Reg Number
3.Marks of 3 subjects.
4.Total of the three subject Marks.
Sorting:
The AutoFit option is the table menu Is used to specify to automatic row and Column
width and is also useful for distributing the rows and columns evenly.
Result:
Output
Before Sorting
After Sorting
TABLE SPLITTING
HOUR/ 1 2 3 4 5 6 7 8
ORDER
I Chem Comp practice Lab Maths Phy Foc EG
Aim
To demonstrate the concept of mail merging in MS-Word.
Procedure
Creation of Mail Merge
1. Make the main document active, where we want to produce the letter.
2. Choose Start Mail Merge option from the Mailings menu. Now select step by step mail
merge wizard.
3. In that box, click on the create button and choose the option Letters.
4. Click on the Letters because we are merging data source to document in active window.
Creation of Data Source
5. Click on the Get data button and choose Create Data Source option.
6. Select the required fields for the data source ( Eg. Address fields) and then click ok and
then click OK and then save the data source with file name.
7. Now give data to that fields and Click OK, now your Data Source File is created.
8. The Mail Merge toolbar is automatically shown in your word document
Insertion of field names in the main document by using the mail merge toolbar
9. Place the cursor where we want to insert, and then click on the Insert Merge Field
button.
10. Choose First Field from the list box to tell Word to place the information from the first
row of the data source file in the form letter. The First merge Field is inserted in the
document.
11. Similarly we can insert other fields at the place we want.
12. If we want to merge data source in form letters then click on the Merge button on
Mail Merge helper dialog box. The resultant merged document will be displayed.
Sample Input and Output:
From:
Google Corporation,
13,Green Avenue,
Devanhalli,Bangalore-56.
To:
<<ADDRESS BLOCK>>
Sir/ Madam,
Sub : Interview Call Letter for the post of Software Engineer.
It gives us immense pleasure to inform you that you have been chosen for
the interview Session for the post of Software Engineer in our Corporation. So you are
th
requested to attend the interview session on 11 October in Hotel Samrat Ashok at 10
AM.
Regards,
XXXXXXX
,
HR Manager,
Google Corporation.
Result
AIM:
To create a flowchart using Microsoft word.
PROCEDURE:
1. To open a word document Click “file” menu then click “new” option.
2. Enter the heading, change the font size. Click the “B” button on the formatting tool
bar so that the heading appears bold.
3. Click “shapes” option from the Insert tool bar, then all the shapes will appear
on the screen.
4. Select the needed shapes one by one and place it on the screen.
5. To c on ne ct a l l t h e b o x e s u s e fl o w lines from the drawing tool bar.
6. To add text inside the shape, select the particular shape and right click the
mouse button. Then select “ add t e x t ” to enter the text.
7. Now the flowchart has been created successfully.
Result:
FLOWCHART
START
READ A,B
SUM = A+B
PRINT SUM
STOP
GREATEST OF TWO NUMBERS
START
READ A,B
IF A > B
PRINT A IS PRINT B IS
BIG BIG
STOP
EX.NO : 05 (a)
CREATION OF SPREAD SHEET IN MS-EXCEL
DATE :
AIM:
To create a spread sheet to analyze the marks of the students of a class
Procedure
Result:
Thus the Spread sheet to analyze the marks of the students are created
successfully.
Output:
EX.NO : 5(b)
CHARTS IN SPREADSHEET
DATE :
Aim
II. The ABC Company shows sales of different products for 5 years. Create Bar Graph, 3D and
Pie Chart for the following.
Procedure
I. Graphs in Excel
1. Enter the data in the Worksheet as shown in question.
2. Choose Chart option from the Insert menu, or choose the Wizard button from the Standard toolbar.
3. Shows the Chart Wizard Step 1 of 4 Chart Type dialog box.
4. Choose the appropriate Chart type from the Chart type list box click Next.
5. Shows the Chart Wizard Step 2 of 4 Chart Source Data dialog then click Next.
6. Shows the Chart you can give the Next. Shows the Chart click Finish. Now the chart is Wizard
Step 3 of 4 Chart Options dialog box, Chart Titles i.e., X and Y Axis Titles etc, then click next.
7. Show the chart Wizard Step 4 of 4 Chart Location dialog box then click finish.
II. Bar Graph
1. Type the data as shown in the Worksheet given in question.
2. Click at cell address Al. Click Insert —>Chart
3. Excel will display the first dialog box of Chart Wizard.
4. Select Bar Graph and click on Next.
5. Click on Data Range from the Chart Wizard dialog box.
6. Select Al to E6, then click Next.
7. Click in the Chart Title box, type - ABC Company.
8. Click on the Category X-Axis, type - YEARS.
9. Click on the Value Y-Axis type PRODUCTS.
10. Click Next, then click FINISH
11. Excel will display the created chart in the current Worksheet.
12. In the same way, repeat the steps for creating 3D and PIE chart.
Result:
Thus the Bar graph and Pie chart is created successfully by using Ms-Excel.
Output
Aim
1. Calculate HRA, DA, TA, Pf, GPF, LIC, Gross Salary, Deductions, net salary from
given data in a worksheet.
Thus the calculations and conversions are done according to the given specification in
MS Excel.
Output
EN NAM BASI HR GP
DA TA LIC PF GS DD NET
O E C A F
DAM 240 300 140 200 100 2900 440 2460
5 20000
U 3600 0 0 0 0 0 0 0 0
132
2 LAK 6000
1080 720 900 420 600 300 8700 0 7380
110
1 MUNI 5000
900 600 750 350 500 250 7250 0 6150
192 240 112 160 2320 352 1968
4 SURI 16000
2880 0 0 0 0 800 0 0 0
180 225 105 150 2175 330 1845
3 VRB 15000
2700 0 0 0 0 750 0 0 0
DEC 2 DEC 2
DECIMAL BIN OCT DEC 2 HEX
35 100011
68 1000100
95 1011111
78 116
165 245
225 341
355 163
375 177
465 1D1
BIN 2
BINARY DEC BIN 2 OCT BIN 2 HEX
101 5
1101 13
111011 59
11111 37
10001 21
110011001 199
111011111 1DF
EX.NO : 5(d)
ELECTRICITY BILL PREPARATION
DATE :
Aim:
Prepare an electricity bill with consumer number, name, bill month, present and
previous meter readings, consumed number of units and total amount of minimum 5
consumers.
Procedure:
Result:
Thus the electricity bill calculation was successfully creates in Ms-Excel
Output:
EX.NO : 6
POWERPOINT PRESENTATION
DATE :
Aim:
To create the presentation for the department using PowerPoint using animation,
design templates and Effective presentation.
Procedure:
Result:
Thus, the presentation for the department using power point using animation,
design templates and Effective presentation is created
Output:
EX.NO : 4 (a)
LEAP YEAR
DATE :
Aim:
Algorithm
Step1: Start the program
Step2: Declare year as int data type
Step3: Read the year
Step4: Check if (ye%4)=0
STEP4.1: Print “It is a leap year”
Step5: Else
Step5.1: Print “It is not a leap year”
Pseudo code
Set initial year.
READ the year.
IF (year % 4 == 0) THEN
WRITE the year is leap year.
ELSE
WRITE the year is not a leap year.
ENDIF
Stop
Flow Chart
Start
Read year
No Yes
Is
year%4=0
Stop
Program
#include<stdio.h>
#include<conio.h>
void main()
{
int ye;
clrscr();
printf (“Enter the year \n”);
scanf (“%d”, &ye);
if (ye%4==0)
printf (“It is a leap year: \n”);
else
printf (“It is not a leap year\n”);
getch();
}
Output
Enter the year: 2000
It is a leap year
Result
Thus the program to find whether a year is leap year has been executed successfully.
EX.NO : 4(b)
ODD OR EVEN
DATE :
Aim
To write a program to find whether the number is even or odd.
Algorithm
Step-1: Start
Step-2: Read num
Step-3: If the number is divided by 2 , print the given number is even .
Step-4: If the number is not divided by 2, print the given number is odd.
Step-5: Stop
Pseudo code
1. BEGIN the program by entering a number.
2. READ the given number and check the condition.
3. IF it is true , print even ELSE odd.
4. TERMINATE the program.
Flowchart
Start
Stop
Enter the
number
num%
Yes 2
==0
No
Print
Even Print Odd
Stop
Stop
Program
#include<stdio.h>
void main()
{
int num;
printf("Enter the number...");
scanf("%d",&num);
if(num%2==0)
printf("The given number is a Even number");
else
printf("The given number is a Odd number");
}
Output
Result
Aim
To write a c program to swap number with three variable
Algorithm
Program
#include< stdio.h>
#include< conio.h>
void main()
{
int i,j;
clrscr();
printf("Enter the i & j value=\n ");
scanf("%d%d",&i&j);
printf(“before swap”);
Printf(“\n%d\n%d\n”,i,j);
printf(“after swap”);
i=i+j;
j=i-j;
i=i-j;
Printf(“\n%d\n%d\n”,i,j); getch();
}
Output
Result
Aim:
To compute area and circumference of a circle using value of ʌ(constant).
Algorithm:
Step 1 : Start
Step 2 : Define constant pi= 3.14
Step 3 : Read the value of radius
Step 4 : Calculate area using formulae pi*radius2
Step 5 : Calculate circumference using formulae 2*pi*radius
Step 6 : Print area and circumference
Step 7 : Stop
Flowchart:
Program:
/* Area and circumference of a circle */
#include <stdio.h>
#include <conio.h>
#define pi 3.14
main()
{
int radius;
float area, circum;
clrscr();
printf("Enter radius of the circle : ");
scanf("%d", &radius);
area = pi * radius * radius;
circum = 2 * pi * radius;
printf("Area is %.2f and circumference is %.2f",area,circum);
getch();
}
Output:
Enter radius of the circle : 8
Area is 200.96 and circumference is 50.24
Result:
Thus area and circumference of a circle is computed.
EX.NO : 4 (d)
QUADRATIC EQUATION
DATE :
Aim:
To determine roots of a real type quadratic equation ax2+ bx + c= 0.
Algorithm:
Step 1 : Start
Step 2 : Read co-efficient values of a,band c
−𝑏+√𝑏2 −4𝑎𝑐 −𝑏−√𝑏2 −4𝑎𝑐
Step 3: Compte roots r1= 𝑎𝑛𝑑
2𝑎 2𝑎
Program:
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
int a, b, c, d;
float r1, r2;
clrscr();
printf("Enter co-efficient for x^2 : ");
scanf("%d", &a);
printf("Enter co-efficient for x : ");
scanf("%d", &b);
printf("Enter const co-efficient : ");
scanf("%d", &c);
d = b*b - 4*a*c;
r1 = (-b + sqrt(d)) / (2.0 * a);
r2 = (-b - sqrt(d)) / (2.0 * a);
printf("Real roots are %.2f and %.2f", r1, r2);
getch();
}
Output:
Enter co-efficient for x^2 : 2
Enter co-efficient for x : 8
Enter const co-efficient : 6
Real roots are -1.00 and -3.00
Result:
Thus roots of a quadratic equation were obtained using math library functions.
EX.NO : 4 (f)
SQUARE ROOT OF GIVEN NUMBERS
DATE :
Aim:
To find the square root of the given numbers
Algorithm:
Step 1 : Start
Step 2 : Read the input value of X
Step 3:Compute and print the value of sqrt(X)
Step 4 : Stop
FLOWCHART:
start
Read X
X
Print sqrt(X)
stop
Program:
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
float x;
clrscr();
printf("Enter the value of x : ");
scanf("%f", &x);
printf("square root of %6.2f is %6.2f”,x,sqrt(x));
getch();
}
Output:
Enter the value of X: 81
Square root of 81.00 is 9.0
Result:
Thus the square of given number root were obtained using math library functions.
EX.NO : 4 (g)
BIGGEST OF TWO NUMBERS USING TERNARY OPERATOR
DATE :
Aim:
To find the biggest of two numbers using ternary operator.
Algorithm:
Step 1 : Start
Step 2 : Read the input value of X,Y
Step 3:Compute biggest among two numbers X,Y and print it
Step 4 : Stop
FLOWCHART:
start
Read X,Y
X
Big=X>Y?X:Y;
Print Big
Program:
stop
#include <stdio.h>
#include <conio.h>
void main()
{
int x,y,big;
clrscr();
printf("Enter the value of x,y : ");
scanf("%d%d", &x &y);
printf("big is ….%d”,big);
getch();
}
Output:
Enter the value of x,y: 5 7
Big is …..7
Result:
Thus the biggest of two numbers using ternary operator is completed.