Ict Lab
Ict Lab
com
Practical :
HTML- code
<DOCTYPE html>
<body>
<P>This is normal text</P>
<P>This is small text</small tex </P>
<P>This is bold text <b> </P>
<P> <strong>This is strong text</strong> </p>
<P> <u>This is underlined text </u> </P>
<P><ins> This is inserted text </ins> </p>
<P><i> This is italic text </i> </p>
<P><em> This is emphasized text </em> </p>
<P><em> This is deleteted text </del> </p>
<P><s> This is strike text </s> </p>
<P> This is subscript text </sub>text </p>
<P>This is <sup> superscript text </sup>text </p>
<pre>
This is a programme
for i = 5 + 0 100 step 5
print
next i
</pre>
</body>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As section in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
HTML- code:
<DOCTYPE html>
<html>
<body>
<h2> An ordered list : </h2>
<ol>
<li>Dhaka </li>
<li>Rajshahi </li>
<li>Chattogram </li>
<li>Khulna </li>
<li>Brishal </li>
<li>Rangpur </li>
<li>Sylhet </li>
<li>Mymenshingh </li>
</ol>
<h2>An ordered list with attribute : </h2>
<ol start = "11">
<li>Barishal </li>
<li>Rangpur </li>
<li>Sylhet </li>
<li>Mymenshing </li>
</ol>
<h2>An unordered list </h2>
<ul type = "square">
<li>Dhaka </li>
<li>Rajshahi </li>
<li>Brishal </li>
<li>Mymenshingh </li>
</ul>
</body>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As section in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
HTML- code:
<DOCTYPE html>
<html>
<body>
<p>
An image:
<img src="rose.jpg" alt="Image of a Rose" width="300" height="300">
</p>
<p>
An image from picture folder in D drive:
<img src="D:\picture\tulip.jpg" alt="Picture of Tulip" width="200"
height="200">
</p>
<p>
an hyperlinked image:
<a href="https://www.google.com">
<img src="google_logo.jpg" alt="Logo" width="200" height="200">
</a>
</p>
</body>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As section in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
HTML- code:
<DOCTYPE html>
<html>
<body>
<html>
<h2>Table with empty cells:</h2>
<table border= “1” width ="50%">
<Captin> Empty Table</Caption>
<tr><td> <td><td> <td></tr>
<tr><td> <td><td> <td></tr>
</table>
<h2>Table with headers:</h2>
<table border= “1” cellspacing= “0”>`
<Caption>Contract</Caption>
<tr><th>Name</th><th>Telephone :2</th></tr>
<tr><td>Amin Arman</td><td>555 77 854</td><td>555 77 855</td></tr>
</table>
<h2>Vertical headers:</h2>
<table border= “1”>
<Caption>Contact</Caption>
<tr><th>Name</th><td>Amin Arman</td></tr>
<tr><th>Telephone:1</th><td>555 77 854</td></tr>
<tr><th>Telephone:2</th><td>555 77 854</td></tr>
</table>
</table>
</body>
<html>
Save file:
1. Write the code in the notepad and click on the Save/Save As section in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
HTML- code:
<!DOCTYPE html>
<html>
<frameset cols="*,*,*,*">
<frame src="lab work-2.html">
<frame src="lab work-3.html">
<lab work-5.html">
<frame src="lab work-4.html">
</frameset>
</html>
Save file:
1. Write the code in the notepad and click on the Save/Save As section in the
file menu. Then the save as dialog box will appear.
2. Type any name in the text box of file Name and write .html or .html at the
end of the name.
3. Select HTML or HTML file from the Type drop down list.
4. Finally click on save. Then the file will be saved.
Result: To open the extracted file in any browser, place the mouse pointer on the
file and double click. Then we can see the output as shown in the next image.
Figure : Use of Frames in HTML
Program code:
#include <stdio.h>
int main()
{
char x;
int n;
float y;
printf ("Enter a number:");
scanf("%d", &n);
printf ("The number is = %d\n\n",n);
printf ("Enter a fraction number:");
scanf("%f", &y);
printf ("The number is = %f",y);
return 0;
}
Saving the program:
1. To save the file, click on the save/save as menu and click press ctrl+s from
the keyboard. Then the save file dialog box will appear.
2. Type any name in the name box of file name and add .c extension at the end
of the name.
3. Select c/c++ from the drop-down list of Eligibility.
4. Finally click on the OK.
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Output : This program does not input a character, an integer, a decimal value. If
you run this program, you will see the result as shown in the image below.
int main()
{
int a,b,c;
printf ("Enter 3 interger valuse:");
scanf("%d %d %d",&a,&b,&c);
if ((a>b) && (a>c))
printf ("Largest value is:%d \n", a);
else if ((b>a) && (b>c))
printf ("Largest value is:%d \n", b);
else
printf ("Largest value is:%d \n", c);
return 0;
}
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Result: Three numbers are not input in this program. Output will be different for
different types of input. If you run this program, you will see the result as shown in
the image.
Figure : Program to find largest number among three numbers using conditional
statement
Explanation: The program compares three numbers with the if-esle statement to
find the larger number. The 1st number is compared with the 2nd and 3rd numbers
to determine the larger number among the three numbers. If 1st number is greater
than 2nd and 3rd number then 1st number will be greater. Similarly 2nd number is
compared with 1st and 3rd number. If 2nd number is greater than 1st and 3rd
number then 2nd number will be greater. Otherwise the 3rd digit will be larger.
Labwork: 09 Program to find sum of series 2+4+6....+n using loop
Dated : 15/01/2023
Required equipment: A personal computer.
Required software:
1. an operating system. E.g.- Windows7/Windows 8/Windows 10 and
2. It's an IDE with GNU GCC compiler. For example- code blocks
Program code:
#include<stdio.h>
int main ( )
{
int n,sum= 0, i;
printef (“Enter a positive integer number:”)
scnaf(“% d & & n);
for (i = 2; i <=n; i=i+2)
{
sum = sum + i;
}
Printf ( “Result : %d\n, sum);
return 0 ;
}
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Result: A positive integer is not input. Output will be different for different types
of input. If you run this program, you will see the result as shown in the image
below.
Program code:
#include <stdio.h>
int main() {
int values[5];
Result : Any three numbers are not input in this program. If you run this program,
you will see the result as shown in the image.
Figure : Program to put some numbers in an array and display the numbers
Explanation: The program uses the function stdio.h included in the library
functions. The line #include<stdio.h> should be placed as the first line of every
program. main() is a function. When the program is started to run, the main()
function is executed first. An array is a collection of data of a data type. The
program makrs declares a variable of type int which can hold up to 5 numbers.
The index of the array serves to separate each data. Array index starts from 0. The
first number will be in marks[0] the second in marks[1] and so on. If you want to
work with a specific variable of the array (display, arithmetic operation), you have
to use the name and index of the array variable.
Labwork: 11 Program to find square root of a number using functions
Date : 29/01/2023
int main() {
double number, squareRoot;
return 0;
}
Saving the program:
1. To save the file, click on the save/save as menu and click press ctrl+s from
the keyboard. Then the save file dialog box will appear.
2. Type any name in the name box of file name and add .c extension at the end
of the name.
3. Select c/c++ from the drop-down list of Eligibility.
4. Finally click on the OK.
Program execution:
1. To compile, click on build menu or press ctrl+F9.
2. To run it, click on build manu or press ctrl+F10.
3. To compile and run together, click on Compile and Run from the
Compile menu or Press ctrl+F9.
Result: No single decimal number is input in this program. Output will be different
for different types of input. Running this program will show results like the image
shown.
= Finished =