Vous êtes sur la page 1sur 30

BE MECHANICAL SEM-1

Pakistan Navy Engineering College


National University of Sciences & Technology
CS – 111

Introduction to Computers
ABDULLAH
ME-1025
Electronics and Power Engineering Department
List of Lab Sessions
1. Lab Session 1:
Identification of System Components
2. Lab Session 2:
Assembling and disassembling of System Hardware using software
3. Lab session 3:

Task 1: To find out the details of System Hardware using Windows


Task: To find out the Shortcut keys from Ctrl-A to Ctrl-Z in MS-Word

4. Lab Session 4:

Introduction to MS-Excel
Task: To create student’s mark sheet and obtain its bar and pie chart
5. Lab Session 5:

Introduction to MS-Power point


Task: To create a presentation on your Intermediate college

6. Lab Session 6:

Introduction to the Visual C++ environment


Task: To make a program that calculates the area of circle
7. Lab Session 7:

Task: To make a program that generates a random number and print ‘#’ symbol that
many times
8. Lab Session 8:

Task 1: Implement the random number generation program using while loop
Task 2: Generate ASCII Codes from 0-255
9. Lab Session 9:

Task 1: Implement the random number generation program using Do-while loop
Task 2: Use switch-case to tell user whether the alphabet entered is a vowel or a consonant

10. Lab Session 10:

Task: To find out the average of numbers using Loops

11. Lab Session 11:


Task: To generate a right-angled triangle and its opposite using ‘*’ symbol

12. Lab Session 12:


Task: To calculate the average of numbers using arrays

ITC LAB 03.a


Objective:
To get the information about your system.
Procedure:
Go to start menu then all programmes then accessories then system
tools then system information and copy all information.

System Information:
ITC LAB 03.b

Objective:
To find out short cut keys of MS Word.
Short cut keys:

 Ctrl +A : Select All  Ctrl +C : Copy


 Ctrl +B : Bold  Ctrl +D : Delete
 Ctrl +E : Centre  Ctrl +J : Justify
 Ctrl +F : Find  Ctrl +K : Insert Hyperlink
 Ctrl +G : Go to  Ctrl +L : Align Text Left
 Ctrl +H : Replace  Ctrl +M: Insert fix Space
 Ctrl +I : Italisize  Ctrl +N: New
 Ctrl +O : Open  Ctrl +T : Tab Command
 Ctrl +P : Print  Ctrl +U :Under Line
 Ctrl +Q: Align Text Left  Ctrl +V : Paste
 Ctrl +R : Align Text Right  Ctrl +W :Quit
 Ctrl +S : Save  Ctrl +X:Cut
 Ctrl +Y :Repeat  Ctrl +Z :Un do
ITC LAB 04
Objective:
To create student’s mark sheet and obtain its bar and
pie chartby using excel.
SUBJECTS Baber noman malik ibrar sahir Farhan SUM average/%age
English 74 78 80 75 84 87 478 79.66666667
Mathematics 99 99 95 86 77 88 544 90.66666667
Chemistry 78 95 74 75 74 85 481 80.16666667
Physics 85 78 86 88 86 79 502 83.66666667
Geography 48 44 64 76 87 76 395 65.83333333
French 65 78 74 86 74 65 442 73.66666667
TOTAL % 74.83333 78.66667 78.83333 81 80.33333 80    

Charts:
ITC LAB 06
Objective:
To make a program that calculates the area of circle.
Program:
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main (void)
{

float r;
float area;

printf("enter the radius of circle: ");


scanf("%f",&r);
area=3.14*r*r;
printf("\n The area of circle; %f", area);
getch();
}
Output:

ITC LAB 07
Objective:
To make a program that generates a random number and print ‘#’
symbol that many times.
Program:
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

void main (void)


{

int num,i;
srand(66);
num=rand();
for(i=1;i<num;i++)

{
printf("#\n");

}
}
Output:

ITC LAB 08.a


Objective:
Implement the random number generation program using while loop.
Program:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main (void)
{
int num,i;
char aa;
printf("enter the seed value: ");
scanf("%d",&num);
flushall();
printf("enter any character: ");
scanf("%c",&aa);
srand(num);
num=rand();
i=1;
while(i<num)
{
printf("%c \n ",aa);

i++;
}
getch();
}

ITC LAB 08.b


Objective:
Generate ASCII Codes from 0-255 in column.
Program:
#include <stdio.h>
#include <conio.h>

void main (void)


{

int i;
for(i=1;i<256;i++)
{
printf(" %d = %c \t",i,i);
}
getch();
}
Output:

ITC LAB 09.a


Objective:
Implement the random number generation program using Do-while loop.
Program:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

void main (void)


{
int i,num;
char cc;
printf("type the seed value: ");
scanf("%d",&num);
flushall();
srand(num);
num= rand();
printf("type character: ");
scanf("%c",&cc);
i=1;
do
{
printf("%d %c \n", i,cc);
i += 1;
}
while(i<=num);
printf("num=%d",num);
getch();
}
Output:

ITC LAB 09.b


Objective:
Use switch-case to tell the user whether the alphabet entered is a
vowel or a consonant.
Program:
#include<stdio.h>
#include<conio.h>

void main (void)

{
char g;
printf("enter only alphabat: ");
scanf("%C",&g);
switch(g)
{
case'a':
case'e':
case'i':
case'o':
case'u':
printf("character is vovel");
break;
default:
printf("Character is consonent");
}
getch();
}
Output:

ITC LAB 10
Objective:
To find out the average of numbers using Loops.
Program:
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main (void)
{
int sum,num,i,input;
float average;
i=1;
sum=0;
input=0;
printf(" Enter the Total numbers of which you want to find
Average; ");
scanf("%d",&num);
flushall();
for(i=1;i<=num;i++)
{
printf(" Enter your Numbers; ");
scanf("%d",&input);
flushall();
sum=sum+input;
}
average=(float)sum/num;
printf(" The average is %.2f ",average);
getch();
}
Output:

ITC LAB 11
Objective:
To generate a right-angled triangle and its opposite using ‘*’ symbol.
Program:
#include <stdio.h>
#include <conio.h>

void main (void)

{
int i,j,rows;
printf("Program to print Right-Angled Triangle\n");
printf("Enter the no of rows: ");
scanf("%d",&rows);
printf("\n");
for(i=0;i<=rows;i++)
{
for(j=0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
for(i=rows-1;i>=0;i--)
{
for(j=0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}

“Output on next page”

OUTPUT:
ITC LAB 12
Objective:
To calculate the average of numbers using arrays.
Program:
#include<stdio.h>
#include<conio.h>
#include<math.h>

void main (void)


{
int i,sum,n,num[3];
float a;
sum=0;
for(i=0;i<=2;i++)
{
printf("enter number: ");
scanf("%d",&num[i]);
sum=sum+num[i];
}
a=(float)sum/3;
printf("averageis %f",a);
getch();
}
Output:

Vous aimerez peut-être aussi