Author Archives: Gangadhar Koppella

Write a C program to perform the following operation on matrices D = A + (B * C), where A, B and C are matrices of (3 X 3) size and D is the resultant matrix – IGNOU MCA Assignment 2018 – 19

MASTER OF COMPUTER APPLICATIONS

Course Code: MCS-011
Course Title : Problem Solving and Programming
Assignment Number : MCA(1)/011/Assign/2018-19
Maximum Marks : 100

Write a C program to perform the following operation on matrices D = A + (B * C), where A, B and C are matrices of (3 X 3) size and D is the resultant matrix - IGNOU MCA Assignment 2018 – 19

Program:

#include<stdio.h>
void main()
{
int A[3][3],B[3][3],C[3][3],D[3][3],I,J,K;
clrscr();
printf(“ENTER 3X3 MATRIX A VALUES\n”);
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
scanf(“%d”,&A[I][J]);
}
}
printf(“ENTER 3X3 MATRIX B VALUES\n”);
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
scanf(“%d”,&B[I][J]);
}
}
printf(“ENTER 3X3 MATRIX C VALUES\n”);
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
scanf(“%d”,&C[I][J]);
}
}
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
D[I][J]=0;
for(K=0;K<3;K++)
{
D[I][J]=D[I][J]+A[I][K]*B[K][J];
}
D[I][J]=D[I][J]+C[I][K];
}
}
printf(“RESULT 3X3 MATRIX D VALUES ARE :\n”);
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
printf(“%d\t”,D[I][J]);
}
printf(“\n”);
}
getch();
}

Code:

#include<stdio.h>
void main()
{
int A[3][3],B[3][3],C[3][3],D[3][3],I,J,K;
clrscr();
printf("ENTER 3X3 MATRIX A VALUES\n");
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
scanf("%d",&A[I][J]);
}
}
printf("ENTER 3X3 MATRIX B VALUES\n");
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
scanf("%d",&B[I][J]);
}
}
printf("ENTER 3X3 MATRIX C VALUES\n");
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
scanf("%d",&C[I][J]);
}
}
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
D[I][J]=0;
for(K=0;K<3;K++)
{
D[I][J]=D[I][J]+A[I][K]*B[K][J];
}
D[I][J]=D[I][J]+C[I][K];
}
}
printf("RESULT 3X3 MATRIX D VALUES ARE :\n");
for(I=0;I<3;I++)
{
for(J=0;J<3;J++)
{
printf("%d\t",D[I][J]);
}
printf("\n");
}
getch();
}

Screen Shots:

C_program_Matrix_Multi_Add

C_program_Matrix_Multi_Add_Output

II) Write an interactive C program to calculate the string length of a given string, using pointers.

Solved program can be found on this link http://cssimplified.com/c-programming-data-structure/write-a-program-to-generate-the-pattern-10m-jun2007

 

Write an algorithm and its corresponding C program to generate students’ Progress-Report for VIII standard of a CBSE school for all its 4 terms – IGNOU MCA Assignment 2018 – 19

MASTER OF COMPUTER APPLICATIONS

Course Code: MCS-011
Course Title : Problem Solving and Programming
Assignment Number : MCA(1)/011/Assign/2018-19
Maximum Marks : 100

Write an algorithm and its corresponding C program to generate students’ Progress-Report for VIII standard (section of 20 students) of a CBSE school for all its 4 terms. Use Structures concept. Assumptions can be made wherever necessary – IGNOU MCA Assignment 2018 – 19

Program:

#include<stdio.h>
struct student
{
int ROLL;
char NAME[15];
int S1T1,S1T2,S1T3,S1T4,S2T1,S2T2,S2T3,S2T4,S3T1,S3T2,S3T3,S3T4
,S4T1,S4T2,S4T3,S4T4,S5T1,S5T2,S5T3,S5T4,S6T1,S6T2,S6T3,S6T4;
}STUD[12]={
{1,”GANESH”  ,25,6,28,6,35,8,26,4,35,6,34,7,27,7,36,5,34,7,31,8,35,7,26,9},
{2,”MAHESH”  ,35,6,26,7,31,6,36,8,25,5,29,6,28,9,37,9,27,7,34,6,31,5,31,8},
{3,”SURESH”  ,21,9,27,7,26,7,28,7,31,6,29,6,28,9,37,9,27,7,34,6,31,5,31,8},
{4,”KALPESH” ,28,9,37,9,27,7,34,6,31,5,31,8,21,9,27,7,26,7,28,7,31,6,29,6},
{5,”RAHUL”   ,27,7,36,5,34,7,31,8,35,7,26,9,21,9,27,7,26,7,28,7,31,6,29,6},
{6,”SUBBU”   ,29,9,34,7,38,9,37,7,34,9,36,8,25,8,37,9,34,7,35,7,27,9,26,7},
{7,”RAKESH”  ,25,8,37,9,34,7,35,7,27,9,26,7,29,9,34,7,38,9,37,7,34,9,36,8},
{8,”ATUL”    ,25,6,38,7,35,8,25,7,27,9,26,6,27,7,36,5,34,7,31,8,35,7,26,9},
{9,”DHARMESH”,35,6,37,7,34,8,36,8,37,7,34,9,28,9,37,9,27,7,34,6,31,5,31,8},
{10,”AJAY”   ,35,7,37,6,34,5,35,7,37,6,36,5,21,9,27,7,26,7,28,7,31,6,29,6},
{11,”ABDUL”  ,25,5,28,7,25,5,26,6,25,6,34,5,35,6,26,7,31,6,36,8,25,5,29,6},
{12,”RASHMI” ,35,7,38,5,25,6,36,5,35,4,26,5,25,6,28,6,35,8,26,4,35,6,34,7}
};
void main()
{

int ROL_NO;
void gen_result(int);
clrscr();

printf(“ENTER roll no (1 to 12) : “);
scanf(“%d”,&ROL_NO);
if(ROL_NO>0 && ROL_NO<13)
gen_result(ROL_NO);
else
printf(“\nYOU HAVE ENTERED WRONG ENROLMENT NO. !!”);
getch();
}
void gen_result(int ROLL)
{
char STATUS;
int M01,M02,M03,M04,M05,M06;
M01=STUD[ROLL-1].S1T1+STUD[ROLL-1].S1T2+STUD[ROLL-1].S1T3+STUD[ROLL-1].S1T4;
M02=STUD[ROLL-1].S2T1+STUD[ROLL-1].S2T2+STUD[ROLL-1].S2T3+STUD[ROLL-1].S2T4;
M03=STUD[ROLL-1].S3T1+STUD[ROLL-1].S3T2+STUD[ROLL-1].S3T3+STUD[ROLL-1].S3T4;
M04=STUD[ROLL-1].S4T1+STUD[ROLL-1].S4T2+STUD[ROLL-1].S4T3+STUD[ROLL-1].S4T4;
M05=STUD[ROLL-1].S5T1+STUD[ROLL-1].S5T2+STUD[ROLL-1].S5T3+STUD[ROLL-1].S5T4;
M06=STUD[ROLL-1].S6T1+STUD[ROLL-1].S6T2+STUD[ROLL-1].S6T3+STUD[ROLL-1].S6T4;
printf(“\n\t\t\tINDIRA GANDHI CBSE HIGH SCHOOL”);
printf(“\n\t\t\tPROGRESS CARD : (2018-2019)”);
printf(“\n\n\tROLL NO.\t: %d”,ROLL);
printf(“\n\tNAME\t\t: %s”,STUD[ROLL-1].NAME);
printf(“\n\tSTANDARD \t: VIII\t\tDIV\t: A”);
printf(“\n\t_______________________________________________________________”);
printf(“\n\tCOURSE\t\t1_TERM\t2_TERM\t3_TERM\t4_TERM\tTOTAL”);
printf(“\n\t CODE\t\t(40%)\t(10%)\t(40%)\t(10%)\t(100%)\tSTATUS”);
printf(“\n\t_______________________________________________________________”);
if(M01<40) STATUS=’F'; else STATUS=’P';
printf(“\n\tENGLISH\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[ROLL-1].S1T1,STUD[ROLL-1].S1T2,STUD[ROLL-1].S1T3,STUD[ROLL-1].S1T4,M01,STATUS);
if(M02<40) STATUS=’F'; else STATUS=’P';
printf(“\n\n\tHINDI\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[ROLL-1].S2T1,STUD[ROLL-1].S2T2,STUD[ROLL-1].S2T3,STUD[ROLL-1].S2T4,M02,STATUS);
if(M03<40) STATUS=’F'; else STATUS=’P';
printf(“\n\n\tMATHS\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[ROLL-1].S3T1,STUD[ROLL-1].S3T2,STUD[ROLL-1].S3T3,STUD[ROLL-1].S3T4,M03,STATUS);
if(M04<40) STATUS=’F'; else STATUS=’P';
printf(“\n\n\tSOCIAL\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[ROLL-1].S4T1,STUD[ROLL-1].S4T2,STUD[ROLL-1].S4T3,STUD[ROLL-1].S4T4,M04,STATUS);
if(M05<40) STATUS=’F'; else STATUS=’P';
printf(“\n\n\tSCIENCE\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[ROLL-1].S5T1,STUD[ROLL-1].S5T2,STUD[ROLL-1].S5T3,STUD[ROLL-1].S5T4,M05,STATUS);
if(M06<40) STATUS=’F'; else STATUS=’P';
printf(“\n\n\tSANSKRIT\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[ROLL-1].S6T1,STUD[ROLL-1].S6T2,STUD[ROLL-1].S6T3,STUD[ROLL-1].S6T4,M06,STATUS);
printf(“\n\t_______________________________________________________________”);
printf(“\n\t\t\tP :- PASSED\t\tF :- FAILED”);
}

Code:

#include<stdio.h>
struct student
{
int ROLL;
char NAME[15];
int S1T1,S1T2,S1T3,S1T4,S2T1,S2T2,S2T3,S2T4,S3T1,S3T2,S3T3,S3T4
,S4T1,S4T2,S4T3,S4T4,S5T1,S5T2,S5T3,S5T4,S6T1,S6T2,S6T3,S6T4;
}STUD[12]={
{1,"GANESH"  ,25,6,28,6,35,8,26,4,35,6,34,7,27,7,36,5,34,7,31,8,35,7,26,9},
{2,"MAHESH"  ,35,6,26,7,31,6,36,8,25,5,29,6,28,9,37,9,27,7,34,6,31,5,31,8},
{3,"SURESH"  ,21,9,27,7,26,7,28,7,31,6,29,6,28,9,37,9,27,7,34,6,31,5,31,8},
{4,"KALPESH" ,28,9,37,9,27,7,34,6,31,5,31,8,21,9,27,7,26,7,28,7,31,6,29,6},
{5,"RAHUL"   ,27,7,36,5,34,7,31,8,35,7,26,9,21,9,27,7,26,7,28,7,31,6,29,6},
{6,"SUBBU"   ,29,9,34,7,38,9,37,7,34,9,36,8,25,8,37,9,34,7,35,7,27,9,26,7},
{7,"RAKESH"  ,25,8,37,9,34,7,35,7,27,9,26,7,29,9,34,7,38,9,37,7,34,9,36,8},
{8,"ATUL"    ,25,6,38,7,35,8,25,7,27,9,26,6,27,7,36,5,34,7,31,8,35,7,26,9},
{9,"DHARMESH",35,6,37,7,34,8,36,8,37,7,34,9,28,9,37,9,27,7,34,6,31,5,31,8},
{10,"AJAY"   ,35,7,37,6,34,5,35,7,37,6,36,5,21,9,27,7,26,7,28,7,31,6,29,6},
{11,"ABDUL"  ,25,5,28,7,25,5,26,6,25,6,34,5,35,6,26,7,31,6,36,8,25,5,29,6},
{12,"RASHMI" ,35,7,38,5,25,6,36,5,35,4,26,5,25,6,28,6,35,8,26,4,35,6,34,7}
};
void main()
{
int ROL_NO;
void gen_result(int);
clrscr();
printf("ENTER roll no (1 to 12) : ");
scanf("%d",&ROL_NO);
if(ROL_NO>0 && ROL_NO<13)
gen_result(ROL_NO);
else
printf("\nYOU HAVE ENTERED WRONG ENROLMENT NO. !!");
getch();
}
void gen_result(int ROLL)
{
char STATUS;
int M01,M02,M03,M04,M05,M06;
M01=STUD[ROLL-1].S1T1+STUD[ROLL-1].S1T2+STUD[ROLL-1].S1T3+STUD[ROLL-1].S1T4;
M02=STUD[ROLL-1].S2T1+STUD[ROLL-1].S2T2+STUD[ROLL-1].S2T3+STUD[ROLL-1].S2T4;
M03=STUD[ROLL-1].S3T1+STUD[ROLL-1].S3T2+STUD[ROLL-1].S3T3+STUD[ROLL-1].S3T4;
M04=STUD[ROLL-1].S4T1+STUD[ROLL-1].S4T2+STUD[ROLL-1].S4T3+STUD[ROLL-1].S4T4;
M05=STUD[ROLL-1].S5T1+STUD[ROLL-1].S5T2+STUD[ROLL-1].S5T3+STUD[ROLL-1].S5T4;
M06=STUD[ROLL-1].S6T1+STUD[ROLL-1].S6T2+STUD[ROLL-1].S6T3+STUD[ROLL-1].S6T4;
printf("\n\t\t\tINDIRA GANDHI CBSE HIGH SCHOOL");
printf("\n\t\t\tPROGRESS CARD : (2018-2019)");
printf("\n\n\tROLL NO.\t: %d",ROLL);
printf("\n\tNAME\t\t: %s",STUD[ROLL-1].NAME);
printf("\n\tSTANDARD \t: VIII\t\tDIV\t: A");
printf("\n\t_______________________________________________________________");
printf("\n\tCOURSE\t\t1_TERM\t2_TERM\t3_TERM\t4_TERM\tTOTAL");
printf("\n\t CODE\t\t(40%)\t(10%)\t(40%)\t(10%)\t(100%)\tSTATUS");
printf("\n\t_______________________________________________________________");
if(M01<40) STATUS='F'; else STATUS='P';
printf("\n\tENGLISH\t\t%d\t%d\t%d\t%d\t%d\t%c",STUD[ROLL-1].S1T1,STUD[ROLL-1].S1T2,STUD[ROLL-1].S1T3,STUD[ROLL-1].S1T4,M01,STATUS);
if(M02<40) STATUS='F'; else STATUS='P';
printf("\n\n\tHINDI\t\t%d\t%d\t%d\t%d\t%d\t%c",STUD[ROLL-1].S2T1,STUD[ROLL-1].S2T2,STUD[ROLL-1].S2T3,STUD[ROLL-1].S2T4,M02,STATUS);
if(M03<40) STATUS='F'; else STATUS='P';
printf("\n\n\tMATHS\t\t%d\t%d\t%d\t%d\t%d\t%c",STUD[ROLL-1].S3T1,STUD[ROLL-1].S3T2,STUD[ROLL-1].S3T3,STUD[ROLL-1].S3T4,M03,STATUS);
if(M04<40) STATUS='F'; else STATUS='P';
printf("\n\n\tSOCIAL\t\t%d\t%d\t%d\t%d\t%d\t%c",STUD[ROLL-1].S4T1,STUD[ROLL-1].S4T2,STUD[ROLL-1].S4T3,STUD[ROLL-1].S4T4,M04,STATUS);
if(M05<40) STATUS='F'; else STATUS='P';
printf("\n\n\tSCIENCE\t\t%d\t%d\t%d\t%d\t%d\t%c",STUD[ROLL-1].S5T1,STUD[ROLL-1].S5T2,STUD[ROLL-1].S5T3,STUD[ROLL-1].S5T4,M05,STATUS);
if(M06<40) STATUS='F'; else STATUS='P';
printf("\n\n\tSANSKRIT\t%d\t%d\t%d\t%d\t%d\t%c",STUD[ROLL-1].S6T1,STUD[ROLL-1].S6T2,STUD[ROLL-1].S6T3,STUD[ROLL-1].S6T4,M06,STATUS);
printf("\n\t_______________________________________________________________");
printf("\n\t\t\tP :- PASSED\t\tF :- FAILED");
}

Screen Shots:

C_program_Students_Evaluation_4

 

C_program_Students_Evaluation_4_Output

II) Write a C program to generate the following pattern:

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5.

Solved program can be found on this link http://cssimplified.com/c-programming-data-structure/write-a-program-to-generate-the-pattern-10m-jun2007

III)  Write a program to generate Fibonacci series using Recursion.

Solved program can be found on this link http://cssimplified.com/c-programming-data-structure/a-c-program-to-find-the-fibonacci-series-of-numbers-using-recursion

 

A C program to convert decimal number to hexadecimal number – IGNOU MCA Assignment 2018 – 19

MASTER OF COMPUTER APPLICATIONS

Course Code: MCS-011
Course Title : Problem Solving and Programming
Assignment Number : MCA(1)/011/Assign/2018-19
Maximum Marks : 100

Write an algorithm, draw a flow chart and write its corresponding C program to convert a decimal number to its equivalent hexadecimal number – IGNOU MCA Assignment 2018 – 19

Program:

#include<stdio.h>
void main()
{
char HEXC[5];
int NUM,Y,I,LEN,HEXD[5];
clrscr();
printf(“ENTER DECIMAL NUMBER TO BE CONVERTED : “);
scanf(“%d”,&NUM);
LEN=0;
Y=NUM;
while(Y>0)
{
HEXD[LEN]=Y%16;
Y=Y/16;
LEN++;
};
for(I=LEN-1;I>-1;I–)
{
if(HEXD[I]<10)
HEXC[I]=HEXD[I]+48;
else
HEXC[I]=HEXD[I]+55;
}
printf(“\nCONVERTED BINARY EQUIVALENT VALUE OF %d IS “,NUM);
for(I=LEN-1;I>-1;I–)
{
printf(“%c”,HEXC[I]);
}
getch();
}

Code:

#include<stdio.h>
void main()
{
char HEXC[5];
int NUM,Y,I,LEN,HEXD[5];
clrscr();
printf("ENTER DECIMAL NUMBER TO BE CONVERTED : ");
scanf("%d",&NUM);
LEN=0;
Y=NUM;
while(Y>0)
{
HEXD[LEN]=Y%16;
Y=Y/16;
LEN++;
};
for(I=LEN-1;I>-1;I--)
{
if(HEXD[I]<10)
HEXC[I]=HEXD[I]+48;
else
HEXC[I]=HEXD[I]+55;
}
printf("\nCONVERTED BINARY EQUIVALENT VALUE OF %d IS ",NUM);
for(I=LEN-1;I>-1;I--)
{
printf("%c",HEXC[I]);
}
getch();
}

Flowchart:-

Flow_Chart_Dec2Hex

Screen Shots:

C_program_Decimal_to_Hexadecimal

C_program_Decimal_to_Hexadecimal_Output

HTML24 Web page contain table attributes colspan and rowspan

Create a Web page that should contain a table having seven rows and four columns, along with the attributes – colspan & rowspan.

       
     
     
     
       
   
       

 

 HTML_Row_Colspan_Page

HTML_Row_Colspan_Source_Code

Table Tags

Colspan and Rowspan Attributes

You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.

 

Create a Web page that should contain a table having seven rows and four columns, along with the attributes – colspan & rowspan.

       
     
     
     
       
   
       

 

Html code:

 

<!DOCTYPE html>
 
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML24</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<TABLE BORDER="1" WIDTH="100%">
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
</TR>
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%" COLSPAN="2">&nbsp;</TD>
<TD WIDTH="50%" ROWSPAN="2">&nbsp;</TD>
</TR>
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
 
</TR>
 
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%" COLSPAN="2">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
</TR>
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="50%" ROWSPAN="2">&nbsp;</TD>
</TR>
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%" COLSPAN="2">&nbsp;</TD>
 
</TR>
<TR>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
<TD WIDTH="25%">&nbsp;</TD>
</TR>
</TABLE>
</BODY>
</HTML>

 

 

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 24</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.

HTML23 Write HTML code to generate the following output

Write HTML code to generate the following output:

Table_Pattern

 HTML_Row_Colspan_Page

HTML_Row_Colspan_Source_Code

 

Table Tags

Colspan and Rowspan Attributes

You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.

 

Write HTML code to generate the following output:

Table_Pattern

Html code:

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML23</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<TABLE BORDER="1" WIDTH="100%">
<TR>
<TD WIDTH="25%">1</TD>
<TD WIDTH="25%">2</TD>
<TD WIDTH="25%">3</TD>
<TD WIDTH="25%">4</TD>
</TR>
<TR>
<TD WIDTH="25%">5</TD>
<TD WIDTH="50%" ROWSPAN="2" COLSPAN="2">
<P ALIGN="center"><IMG BORDER="0" WIDTH="600" HEIGHT="200" SRC="logo.jpg"</P>
</TD>
<TD WIDTH="25%">6</TD>
</TR>
<TR>
<TD WIDTH="25%">7</TD>
<TD WIDTH="25%">8</TD>
</TR>
<TR>
<TD WIDTH="25%">9</TD>
<TD WIDTH="25%">10</TD>
<TD WIDTH="25%">11</TD>
<TD WIDTH="25%">12</TD>
</TR>
</TABLE>
</BODY>
</HTML>

 

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 23</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.

HTML22 Design an HTML Page for the “Block Introduction” of this book.

Design an HTML Page for the “Block Introduction” of this book: The page should allow scrolling and the code should contain a comment header with your name and enrolment number.

HTML_Block_intro_Page

HTML_Block_intro_Source_Code

Design an HTML Page for the “Block Introduction” of this book: The page should allow scrolling and the code should contain a comment header with your name and enrolment number.

Html code:

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML22</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<P ALIGN="Center"><B><BIG>KOPPELLA-022203804</BIG></B><BR></P>
This Block is a practical block. It consists of 5 sections, namely,
HTML,Advanced HTML, VBScript, JavaScript, and Dreamweaver.
Each section introduces the basics of scripting language,
how to create the basic documents and finally a list of 10 sessions
for doing practical excercises.
</P>
<P>
The block is organized as follows: sestion 1 describes HTML.
It intoduces the basics of HTML, how to create an HTML document,
steps for creating an HTML program and finally, it contains 10 sessions
for lab practice.
</P>
<P>
Section 2 goes one step further and intoduces Advanced HTML.
All the lab excercises in this sessions are about the two basic
advanced features: frames and forms. HTML deals with forms exactly
the same way as youy would with a paper form. There are groups of items
and single all gathered together in one large form, like a paper form.
</P>
<P>
Section 3 focuses on JavaScript, which is also a scripting language.
The JavaScript provides interactivity to the user.
The following features are supported in JavaScript:
<UL>
<LI>Add scrolling or changing messages to the browser's status line.</LI>
<LI>Validate the contents of a form and make calculations.</LI>
<LI>Display messages to the user, either as part of a web page or in alert boxes.</LI>
</UL>
This section also gives tips on how to incorporate JavaScript into a Web page.
</P>
</BODY>
</HTML>
</TABLE>
</BODY>
</HTML>

 

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 22</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<P>…</P>

The <p> tag offers a way to structure your text into different paragraphs. Each paragraph of text should go in between an opening <p> and a closing </p> tag.

 

<B>…</B>

Anything that appears within <b>…</b> element, is displayed in bold.

 

<I>…</I>

The HTML <i> tag is used to display the content in italic.

 

<BIG>…</BIG>

The content of the <big>…</big> element is displayed one font size larger than the rest of the text surrounding it.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.

HTML21 Write HTML code to generate the following output.

Write HTML code to generate the following output:

Table_Pattern_04

 

Table Tags

Colspan and Rowspan Attributes

You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.

HTML_Table_Pattern_Page

HTML_Table_Pattern_Source_Code

Write HTML code to generate the following output:

Table_Pattern_04

Html code:

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML21</TITLE>
</HEAD>
<BODY bgColor=”yellow” Text=”blue”>
<TABLE BORDER=”1″ WIDTH=”75%”>
<TR>
<TD WIDTH=”25%” ROWSPAN=”2″>Weather</TD>
<TD WIDTH=”25%” ><B>DELHI</B></TD>
<TD WIDTH=”25%” ><B>MUMBAI</B></TD>
</TR>
<TR>
<TD WIDTH=”25%”>40</TD>
<TD WIDTH=”25%”>35</TD>
</TR>
</TABLE>
</BODY>
</HTML>

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 21</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.

HTML20 Design an HTML Page having 3 images placed in the following format

Design an HTML Page having 3 images placed in the following format.

 

Table_Pattern_03

Let us take a look at the syntax of the <IMG> tag:

<IMG SRC = “FILENAME.GIF” WIDTH = “value” HEIGHT = “value” ALT = “alternate text” BORDER = “value” ALIGN = “value”>

  1. SRC: This attribute specifies the pathname to the source file that contains the image. The value in the above example, “image.gif”, means that the browser will look for the image named image.gif in the same folder (or directory) as the html document itself.
  2. WIDTH: This is used for specifying the desired width of the image.
  3. HEIGHT: This is used for specifying the desired height of the image.
  4. BORDER: An important attribute of the IMG tag is BORDER. This attribute specifies the width of the border of the image. By default it is 0, i.e. there is no border. As shown in Figure 2.9 the image “image.gif” has been given a border 2 pixel wide. The following code gives a wider border to the above image. <BODY BGCOLOUR=”#FFFFFF”> <IMG SRC=”image.gif” WIDTH=130 HEIGHT=101 BORDER=10> </BODY>
  5. ALT: Another IMG attribute that is important is ALT. ALT is sort of a substitute for the image that is displayed or used when the user is using a browser that does not display images. Someone may be using a text only browser, he may have image loading turned off for speed or he may be using a voice browser (a browser where the web page is read out). In those cases, that ALT attribute could be very important to your visitor as it could be used (given the proper text) to describe the image that is not on the screen.

HTML_Table_Image_Pattern_Page

HTML_Table_Image_Pattern_Source_Code

Design an HTML Page having 3 images placed in the following format.

Table_Pattern_03

Html code:

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML20</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<TABLE BORDER="0" WIDTH="45%">
<TR>
<TD WIDTH="15%">
<IMG SRC="html.jpg" WIDTH="180" HEIGHT="120"></TD>
<TD WIDTH="17%"></TD>
<TD WIDTH="68%"></TD>
</TR>
<TR>
<TD WIDTH="15%"></TD>
<TD WIDTH="17%">
<IMG SRC="html.jpg" WIDTH="180" HEIGHT="120"></TD>
<TD WIDTH="68%"></TD>
</TR>
<TR>
<TD WIDTH="15%"></TD>
<TD WIDTH="17%"></TD>
<TD WIDTH="68%">
<IMG SRC="html.jpg" WIDTH="180" HEIGHT="120"></TD>
</TR>
</TABLE>
</BODY>
</HTML>

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 20</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

<IMG>

The HTML <img> tag is can be used for displaying an image with the desired height and width.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.

HTML19 Create the following table in HTML with Different colors

Create the following table in HTML with Different colors.

Table_Pattern_02 

Table Tags

 BGCOLOUR Attributes

It can be used for changing the background colour of the table. By default the background colour is same as of the page colour.

Colspan and Rowspan Attributes

You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.

HTML_Table_Different_Colour_Page

HTML_Table_Different_Colour_Source_Code

Create the folloing table in HTML with Different colors.

Table_Pattern_02

 Html code:

 

<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML19</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<TABLE BORDER="1" WIDTH="100%">
<TR>
<TD WIDTH="100%" BGCOLOR="white" COLSPAN="3">Color(White)</TR>
<TR>
<TD WIDTH="33%" bgColor="red">RED</TD>
<TD WIDTH="33%" BGCOLOR="green">GREEN</TD>
<TD WIDTH="33%" BGCOLOR="black">BLACK</TD>
</TR>
<TR>
</TR>
</TABLE>
</BODY>
</HTML>

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 19</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.

HTML18 Create the following table in HTML with Dummy Data

Create the following table in HTML with Dummy Data

Table_Pattern_01 

Table Tags

Colspan and Rowspan Attributes

You will use colspan attribute if you want to merge two or more columns into a single column. Similar way you will use rowspan if you want to merge two or more rows.

HTML_Table_Rowspan_Colspan_Page

HTML_Table_Rowspan_Colspan_Source_Code

 

Create the following table in HTML with Dummy Data

Table_Pattern_01Html code:

 <!DOCTYPE html>
 
<HTML>
<HEAD>
<TITLE>CSSimplified.com HTML18</TITLE>
</HEAD>
<BODY bgColor="yellow" Text="blue">
<TABLE BORDER="5" WIDTH="100%">
<TR>
<TD WIDTH="5%" ROWSPAN="2"><B>TrainNo.</B></TD>
<TD WIDTH="15%" ROWSPAN="2"><B>Name of Train</B></TD>
<TD WIDTH="15%" ROWSPAN="2"><B>Place</B></TD>
<TD WIDTH="15%" ROWSPAN="2"><B>Destination</B></TD>
<TD WIDTH="30%" ALIGN="center" COLSPAN="2"><B>Time</B></TD>
<TD WIDTH="15%" ROWSPAN="2"><B>Fare</B></TD>
</TR>
<TR>
<TD WIDTH="15%"><B>Arrival</B></TD>
<TD WIDTH="15%"><B>Departure</B></TD>
</TR>
<TR>
<TD WIDTH="5%">1029</TD>
<TD WIDTH="15%">Intercity</TD>
<TD WIDTH="15%">Mumbai</TD>
<TD WIDTH="15%">Pune</TD>
<TD WIDTH="15%">6.45</TD>
<TD WIDTH="15%">11.50</TD>
<TD WIDTH="15%">250</TD>
</TR>
<TR>
<TD WIDTH="5%">1312</TD>
<TD WIDTH="15%">Rajdhani</TD>
<TD WIDTH="15%">Delhi</TD>
<TD WIDTH="15%">Jaipur</TD>
<TD WIDTH="15%">10.15</TD>
<TD WIDTH="15%">19.00</TD>
<TD WIDTH="15%">1600</TD>
</TR>
</TABLE>
</BODY>
</HTML>

 

Write above code in any text editor and save by htm or html extension and Open it in any browser by double clicking the file like internet explorer.

 

<!DOCTYPE html>

This tag defines the document type and HTML version.

 

<HTML>…</HTML>

This tag encloses the complete HTML document and mainly comprises of document header which is represented by <head>…</head> and document body which is represented by <body>…</body> tags.

 

<HEAD>…</HEAD>

This tag represents the document’s header which can keep other HTML tags like <title>, <link> etc.

 

<TITLE> CSSimplified.com HTML 18</TITLE>

The <title> tag is used inside the <head> tag to mention the document title.

 

<BODY>…</BODY>

This tag represents the document’s body which keeps other HTML tags like <h1>, <div>, <p> etc.

 

<TABLE>

The HTML <table> tag is used for defining a table. The table tag contains other tags that define the structure of the table.

 

<TR>

The HTML <tr> tag is used for specifying a table row within a table.

 

<TD>

The HTML <td> tag is used for specifying a cell or table data within a table.

 

The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration tag is used by the web browser to understand the version of the HTML used in the document. Current version of HTML is 5 and it makes use of the following declaration:

<!DOCTYPE html>

There are many other declaration types which can be used in HTML document depending on what version of HTML is being used. We will see more details on this while discussing <!DOCTYPE…> tag along with other HTML tags.

Note:- To understand program for sequence in detail Please SEARCH numerically example: HTML01, HTML02, etc.