Académique Documents
Professionnel Documents
Culture Documents
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:
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:
6. Lab Session 6:
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
System Information:
ITC LAB 03.b
Objective:
To find out short cut keys of MS Word.
Short cut keys:
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;
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>
int num,i;
srand(66);
num=rand();
for(i=1;i<num;i++)
{
printf("#\n");
}
}
Output:
i++;
}
getch();
}
int i;
for(i=1;i<256;i++)
{
printf(" %d = %c \t",i,i);
}
getch();
}
Output:
{
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>
{
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:
ITC LAB 12
Objective:
To calculate the average of numbers using arrays.
Program:
#include<stdio.h>
#include<conio.h>
#include<math.h>