Salihas Practical
Salihas Practical
Contents
Practical No 01.............................................................................................................1
Title: Exploring the Taskbar............................................................................................1
Procedure:.......................................................................................................................1
Inserting Pictures:........................................................................................................1
Clip art:.........................................................................................................................2
Shapes:.........................................................................................................................2
Procedure:...................................................................................................................2
4. Smart Art:.................................................................................................................3
5. Charts:......................................................................................................................3
6. Screenshot:..............................................................................................................4
Practical no : 2..............................................................................................................5
Title: Functionality of Table of Content, Page Break and Section Break.........................5
Table of Contents:.............................................................................................5
Steps:...........................................................................................................................5
Table of Figure and Caption:.............................................................................6
Step:.............................................................................................................................6
Page Break:........................................................................................................6
Steps:...........................................................................................................................6
Section Break:....................................................................................................7
Practical no 03..............................................................................................................8
Title: Making the mark sheet of computer programming and its application in
engineering......................................................................................................................8
Formula for Grading........................................................................................................1
Formula for VLOOKUP.....................................................................................................1
Practical no 04:.............................................................................................................2
Title: Calculate the missing Attributes of underneath table...........................................2
Draw a Chart between March and April for 2000-2010..................................................2
Make a comparison between total and first three months rainfall................................2
i
Practical Notebook CS-401 2019-20
Check the trend between Total years rainfall and monthly rainfall on the basis of year
and avg rainfall................................................................................................................2
Chart no.1..............................................................................................................3
Chart no.2..............................................................................................................3
Chart no.3..............................................................................................................4
Practical no. 05.............................................................................................................5
Title: Programs using input output functions in c++.......................................................5
Write a program that takes radius from user and gives out the area and
circumference..............................................................................................................5
Write a program that takes height in inches from user and gives output in cm..6
Take temperature in Celsius from user and print in Fahrenheit..........................7
Taking base and height of triangle from user and printing area..........................8
Write a program that will prompt the user to enter number of hours and
display number of weeks, days, hours within the input number of hours.................9
Practicaal no. 06.........................................................................................................12
Title: Programs using loops and switches......................................................................12
Write the program that input test scores of a student and display his grade.. .12
Write a program that inputs a letter from the user and shows weather it is a
vowel or a consonant................................................................................................14
...................................................................................................................................14
...................................................................................................................................14
Practical no. 07...........................................................................................................16
Title: Write programs using different arithmetic operations and loops.......................16
Write a program that inputs a number for the user and displays its table using
for loop......................................................................................................................16
Write a program that displays a product of odd numbers from 1 to 10............17
Write a program that displays first five numbers and their squares using do
while loop..................................................................................................................18
...................................................................................................................................18
...................................................................................................................................19
Practical no. 08...........................................................................................................20
ii
Practical Notebook CS-401 2019-20
Figures
iii
Practical Notebook CS-401 2019-20
v
Practical Notebook CS-401 2019-20
Practical No 01
Title: Exploring the Taskbar.
Procedure:
We can explore the insert tab by simply using
the tools like inserting pictures, clip arts, drawing different types of shapes and charts
and also we can organize the steps of some process and differentiating things and for
telling the relationship between two things by using SmartArt tool.
We can understand the following tools and there usage the simply explain them and
posting some example.
Inserting Pictures:
Click on the icon and dialogue box will appear and then select a required picture.
We can insert downloaded pictures and can format them with different properties.
Right click the mouse button and you will get following options like formatting the
picture, giving it some title or caption, set the size and position of the picture.
You can manage the text with the picture like writing behind, in front of at the back etc
of the picture.
1
Practical Notebook CS-401 2019-20
Clip art:
Figure 2: ClipArt
Clip art is used to add online pictures by browsing within the word.
Click on the icon and then type or search the required theme you want to add.
You can select or search specified thing like only searching photos or some audio
or videos and you can search all of them in one search.
If we are adding a picture we can adjust them with same properties like inserting
a picture like setting position, wrapping text and so on.
Shapes:
Procedure:
Click on the icon and then choose the shape you want.
Now we can change and format that shape according to our taste and
document.
Figure 3: Shapes
2
Practical Notebook CS-401 2019-20
Lines: it consist of parallel, zigzag, straight, circular and many lines for different
purposes.
Basic shapes: it consist of different shapes like pentagon, diamond shapes and
different brackets for different purposes.
Rectangles: it consist of rectangles having straight and curved corners.
Block arrows: it consist of solid arrow heads of different designs and shapes for
different purposes.
And many other shapes like flow chat, equation shapes etc.
4. Smart Art:
2. Just click on the icon of SmartArt and the dialogue box will appear.
3. In that dialogue box many shapes are present in which we can show two
different things or topics and the steps of the procedure and also a cycle.
5. Charts:
3
Practical Notebook CS-401 2019-20
Charts are used to draw a graphs of two determined quantities showed in a table.
Click on the icon and the dialogue box will appear showing different shapes of
charts like of line, columns, pie charts, bar, area, bubble and many others.
We can format these shapes by giving them a title and showing their axis and
naming them.
Charts are very easy to draw. Just give the range and limit in dialogue box of
ENTER DATA.
If two or more quantities are to be drawn then it’s necessary to give legends.
Bullets also give necessary information.
6. Screenshot:
4
Practical Notebook CS-401 2019-20
Practical no : 2
Title: Functionality of Table of Content, Page Break and Section Break
The reference ribbon gives users the ability to create a Table of Content and/ or
footnotes and a bibliography for a research paper.
Table of Contents:
Users can automatically generate a table of content for their
document provided they created headings and subheadings.
Steps:
1) Apply page break on the 1stpage on the back of heading 1.
2) Now on the new page click anywhere on the page.
3) Now go to the references tab and select the option table of content.
4) Select the type of table of content you want to add.
5) The table will be drawn on that page according to the headings.
5
Practical Notebook CS-401 2019-20
Step:
1) Go to the reference tab.
2) Select Table of Figure from the caption bar.
3) A new dialogue box will open.
4) Select which table of content you want to enter.
5) Now if you do any changing in the figure caption.
6) Go to the reference tab again and update the table to apply the setting there.
Page Break:
In page break we can end the page anywhere without keeping in
view there is a space for writing or not. If we want to end the current page and want to
move on next page or to leave the page empty we can simply use the page break
command.
Steps:
1) Move the blinking cursor from where you want to end the page.
6
Practical Notebook CS-401 2019-20
Section Break:
This command allow us to create sections in already created pages.
Section break also allow us to recreate or redesign the page in the already created series
of pages. We can change the header and footer titles. We can also restart the page
numbering.
7
Practical Notebook CS-401 2019-20
Practical no 03
Title: Making the mark sheet of computer programming and its application in engineering
8
Practical Notebook CS-401 2019-20
Grade=IF(OR(SUM(D12:E12)<(0.4*0.2*$L$5),F12<(0.6*$L$5*0.2),G1
2<0.4*$L$6,SUM(D12:F12)<(0.4*$L$5),H12<(0.4*($L$5+
$L$6))),"F",IF(H12>=32,"A",IF(H12>=26,"B",IF(H12>=20,"C",IF(H12>=16,"D"))))).
1
Practical Notebook CS-401 2019-20
Practical no 04:
Title: Calculate the missing Attributes of underneath table
Draw a Chart between March and April for 2000-2010
Make a comparison between total and first three months rainfall
Check the trend between Total years rainfall and monthly rainfall on the basis of year and avg rainfall
Year 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997
Jan 29 60 41.4 9.17 119.1 28.3 34.44 24.4 70.12 29.6
Feb 24.5 15.6 104.9 110.9 83.6 46.9 46.85 60.16 108.3 17
March 158.8 75.4 170.3 91.3 108.7 144.7 24.8 72.8 98.2 93.52
April 24.2 6.1 49.8 131.1 47.13 27.84 69.95 76.14 58.5 162.2
May 16 6.6 7.7 32.3 52.5 23.6 44.03 24.5 70.34 42.8
June 66.4 56 143.7 67 23.55 0 69.1 4.97 103.3 91.2
July 718 396.8 347.6 317.4 155.6 262.54 535.06 608.9 160.62 231.1
Aug 279 161.3 548.8 186.71 182.42 198.4 578.5 214 338.21 503.75
Sep 147.5 24.6 170 208 358.4 228.8 76.6 33.55 139.4 184.4
Oct 27.5 20.59 3.3 0 12.78 0 44.52 66.72 39.46 46.27
Nov 0 2.8 1.3 1.23 28.06 8.5 2.2 21.5 2.6 27.05
Dec 5.9 49.9 171.04 25.6 6.62 0 101.56 29.7 6.4 23.56
(TOTAL mm) 1180.7
monthly 1496.8 875.69 1759.84 1 1178.46 969.58 1627.61 1237.34 1195.45 1452.45
98.392 80.7983
Avg(mm) 124.7333 72.97417 146.6533 98.205 135.6342 103.1117 99.62083 121.0375
5 3
2
Practical Notebook CS-401 2019-20
Chart no.1
Chart no.2
3
Practical Notebook CS-401 2019-20
Chart no.3
4
Practical Notebook CS-401 2019-20
Practical no. 05
Title: Programs using input output functions in c++.
Write a program that takes radius from user and gives out the area and
circumference.
#include <iostream>
# define PI 3.141
int main ( )
cin>>radius;
area=PI*(radius*radius);
circumference=2*PI*radius;
return 0; }
5
Practical Notebook CS-401 2019-20
Start
Enter radius
Area=3.14*radius*radius
Circum=2*3.14*radius
Print
radius,cicum
End
Write a program that takes height in inches from user and gives output
in cm.
#include<iostream>
main()
cin>>inch;
cm=2.54*inch;
cout<<"height in cm is:"<<cm;}
6
Practical Notebook CS-401 2019-20
Start
Enter height in
inches
cm=2.54*inch
Print height in cm
End
main()
cin>>celsius;
fahrenheit=(9/5)*celsius+32;
7
Practical Notebook CS-401 2019-20
start
Enter
temperature in
celsius
Fahrenheit=(9/5)*Celsius+32
Print
temperature in
fahrenheit
end
Taking base and height of triangle from user and printing area.
#include <iostream>
main()
float base,height,area;
8
Practical Notebook CS-401 2019-20
cin>>base;
cin>>height;
area=(height*base)/2;
Start
Enter base,
height
Area=05*base*height
Print area
End
Write a program that will prompt the user to enter number of hours
and display number of weeks, days, hours within the input number of
hours.
9
Practical Notebook CS-401 2019-20
#include<iostream>
int main()
float ho,m,hr,d;
float w;
cin>>ho;
w=ho/168;
d=ho/24;
hr=ho/24;
return 0;
system("pause");
10
Practical Notebook CS-401 2019-20
Start
Enter number of
hours
w=ho/168
d=ho/24
hr=ho/24
Print
w(weeks),d(day),
hr(hours)
End
11
Practical Notebook CS-401 2019-20
Practicaal no. 06
Title: Programs using loops and switches.
Write the program that input test scores of a student and display his
grade.
#include <iostream>
int main()
int a;
cout<<"enter number:";
cin>> a;
if (a>=100){
else if (a>=90){
else if (a>=80){
else if (a>=70){
lse if (a>=60){
12
Practical Notebook CS-401 2019-20
yes
Score>=100 Print A
Score>=90
yes
Print B
yes
Score >=80
Print B-
yes
Score>=70
Print C
Score >=60
no
Print F
End
13
Practical Notebook CS-401 2019-20
Write a program that inputs a letter from the user and shows weather it
is a vowel or a consonant.
#include <iostream>
main()
char c;
cin>> c;
switch(c)
start
14
Practical Notebook CS-401 2019-20
yes
Is c=a vowel
yes
Is c=e
vowel
yes
Is c=i
vowel
yes
Is c=o vowel
yes
Is c=u vowel
no
consonent
End
Figure 27: Flow chart Representation
15
Practical Notebook CS-401 2019-20
Practical no. 07
Title: Write programs using different arithmetic operations and loops.
Write a program that inputs a number for the user and displays its table
using for loop.
#include <iostream>
main()
int len,tab,a;
cin>> tab;
cin>> len;
for (a=1;a<=10;a++)
cout<<tab<<"*"<<a<<"="<<tab*a<<endl; }
16
Practical Notebook CS-401 2019-20
A=1
number A
Input
A<=10
Start
End
C=A*B
Print
A*B=C
main()
int c,a;
for(c=1;c<=10;c=c+2){
cout<<c<<endl;
a*=c;}
17
Practical Notebook CS-401 2019-20
Write a program that displays first five numbers and their squares
using do while loop.
#include <iostream>
int main()
{ int a;
int j=1;
int c;
do
{ c=j*j;
j++;
}while (j<=5);
return 0; }
18
Practical Notebook CS-401 2019-20
Print J
Start
Input A
N=0
Yes
A=A+1
N<5 Print B=A 2
Print B
A N=N+1
No
End
19
Practical Notebook CS-401 2019-20
Practical no. 08
Title: Program using arrays.
Write a program that input ten numbers from the user in an array and
displays the maximum number.
Syntax for Problem:
#include<iostream>
main()
int array[10],a,b;
for(a=0;a<10;a++)
cin>>array[a];
b=array[0];
for (a=0;a<10;a++)
if (b<array[a])
b=array[a];
20
Practical Notebook CS-401 2019-20
Start
A=0,A<10,
A++
Input Array
b=Array[0] A=0,A<10,
A++
21
Practical Notebook CS-401 2019-20
b=Array[a]
b<Array[a]
Print b
End
22
Practical Notebook CS-401 2019-20
Practical No.:9
Title: Write a program that inputs a number and display its processor
and successor number using function.
void value(int);
main()
int x;
cin>>x;
value(x);
void value(int x)
int p,n;
p=x-1;
n=x+1;
23
Practical Notebook CS-401 2019-20
24