MYSQL
MYSQL
Diphu
A Project work
on
COMPUTER SCIENCE
Submitted by
Name: __________
Submitted to
Javed Ali
Subject Teacher
on
__/__/____
DECLARATION
Name: _____________
Class: __ , Sec. __
Roll No. ____
CERTIFICATE
The project work was carried out by (him/her) under my supervision in the
academic year 2024-2025. On the basis of the declaration made by him/her, I
recommend this project report for evaluation.
Certified by
Approved by
Ans:
<HTML
<HEAD>
<TITLE>
</HEAD>
<BODY BGCOLUR=lightblue>
<FORM>
</TEXTAREA>
Hobby<BR>
<FILEDSET>
<LEGEND>Types of button</LEGEND>
</FILESET>
</FORM>
</BODY>
</HTML>
Ans:
<HTML>
<TR>
<TH>SI.No.</TH>
<TH>Name</TH>
<TH>Marks</TH>
</TR>
<TR>
<TD>1</TD>
<TD>Rohan</TD>
<TD>56</TD>
</TR>
<TR>
<TD>2</TD>
<TD>Arpita</TD>
<TD>48</TD>
</TR>
</TABLE>
</BODY>
</HTML>
Q3. Create a table worker in a database name Organisation .Enter the records given
in the table below.
Q5. Write a C program to print the summation of N numbers entered using the
keyboard.
#include<stdio.h>
int main()
<HEAD>
<TITLE>Table in HTML</TITLE>
<style type="type/css">
table,th,td
border-collapse:collapse;
th,td
padding:20px;
</style>
</HEAD>
<BODY>
<TABLE>
<CAPTION>Student Details</CAPTION>
int i,N,var,sum=0;
scanf("%d",&N);
for(i=1;i<=N;i++)
scanf("%d",&var);
sum=sum+var;
return 0;
}
6
Q6. Write C programs to display the following patterns using nested loop construct:
a) 4321
4321
4321
4321
4321
solution:
#include<stdio.h>
int main()
int i,j;
for(i=1;i<=5; i++)
for(j=4;j>=1;j--)
printf(“%d”,j);
printf(“\n”);
return 0;
}
7
b) 2
234
23456
Solution:
#include<stdio.h>
int main()
int i,j,k;
for(i=1;i<=3; i++)
printf(“ ”);
printf(“%d”, k+1);
printf(“\n”);
return 0;
}
8
c) 1
121
12321
Solution:
#include<stdio.h>
int main()
printf(“ “);
printf(“\n”);
return 0;
}
d) *
***
*****
*******
*****
***
*
Solution:
#include<stdio.h>
int main()
{
int I, j, k;
for (k=1; k<=5; k++)
{
for (i=1; 1<=(5-k); i++)
{
printf (“ “);
}
for (j=1; j<=(2*k-1; j++)
{
printf(“x”);
}
printf(“\n”);
}
for (k=4;k>=1; k--)
{
for ( i=1; i<=(k-k); i++)
{
printf (“ “);
}
{
printf(“x”);
}
printf (“\n”);
}
return 0;
}
10
e) 121
121
121
121
121
Solution:
#include<stdio.h>
int main()
int I,j;
for (i=1;1<=5;i++)
for (=1;j<=2;j++)
printf (“%d”,j);
printf(“\n”);
return (0);
}
11
Q7. Write a C program to find the summationof a series of numbers using an array.
Ans:
#include<stdio.h>
int main()
int number[20];
scanf("%d", &totalEle);
scanf("%d", &number[i]);
sum=sum + number[i];
return 0;
}
12
Q8. Write a C program to find the largest number among a series of numbers using
an array.
Ans:
#include<stdio.h>
int main()
int number[20];
int totalEle;
scanf("%d",&totalEle);
scanf("%d", &number[i]);
for(int i=1;i<totalEle;i++)
if(number[i]>largest)
largest=number[i];
return 0;
}
13
Ans:
#include<stdio.h>
int main()
int index=0;
while(index<8)
printf("%c",char_array[index]);
index=index+2;
return 0;
}
14
Ans:
#include<stdio.h>
#include<string.h>
int main()
char name[20];
gets(name);
puts(name);
return 0;
}
15
Q11. Write a C program for finding the largest among a series of numbers.
Ans:
#include<stdio.h>
int number[20];
int main()
scanf("%d", &totalEle);
scanf("%d",& number[i];
int largest=number[0]
if( number[i]>largest)
largest=number[i];
}
16
return largest;
Ans:
#include<stdio.h>
int factorial=1
while (number>0)
factorial=factorial*number;
number=number-1;
int main()
scanf("%d", &number);
return 0;
}
17
Q13. Write a C program for finding the factorial of a number using recursion.
Ans:
#include<stdio.h>
if (number = = 0)
return 1;
else
int main()
return 0;