C Micro Proj
C Micro Proj
Programing in c
Semester 2
Branch: - Computer Engineering
MSBTE
Subject: - programing in c
Project Title: -
Project submitted to GOVERNMENT POLTECHNIC
NANDURBAR.
CERTIFICATE
MSBTE
This Is Certify That Mr. / MS. …………………………………………………………Roll No………………
Enrollment No. Is ....................................First Semester of Diploma in Electrical
Engineering Of Institute Government Polytechnic, Nandurbar Has Completed
The Micro Project Satisfactorily In Subject Applied Mathematics (22201) For
The Academic Year 2022-2023 As Prescribed In the Curriculum.
Place:
Enrollment no:
Date:
Exam seat no:
Principle
Government Polytechnic, Nandurbar
Q1. Write a program to read 10 numbers in a array and arrange it in Ascending order
#include<stdio.h>
#include<conio.h>
Void main();
{
int a[10], sum, I;
float avg;
Clrscr();
Printf(“enter ten number”);
For()or(i=0; i<=9;i++);
{ scanf(“%d, &a(I) ;
Sum=sum+a(i) ;
}
Avg=sum/10;
printf(“sum=%d”, sum);
printf(“avg=%f”, avg);
getch();
}
Q2. Write a program to accept the value of year as input from the
Keyboard & print whether it is a leap year or not.
#include<stdio.h>
#include<conio.h>
void main() {
int year;
clrscr();
printf("Enter year");
scanf("%d",&year);
if(year%4==0) {
printf("Year %d is a leap year",year);
} else {
printf("Year %d is not a leap year",year);
}
getch();
}
Q3. Write a program for addition of two 3 x 3 matrices
#include<stdio.h>
#include<conio.h>
Void main()
{
Int a[3][3],b[3][3],c[3][3],I,j;
Clrscr();
Printf(“Enter first matrix elements:\n”);
For(i=0;i<3;i++)
{
For(j=0;j<3;j++)
{
Scanf(“%d”,&a[i][j]);
}
}
Printf(“\nEnter second matrix elements:\n”);
For(i=0;i<3;i++)
{
For(j=0;j<3;j++)
{
scanf("%d",&b[i][j]);
}
}
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
c[i][j]=a[i][j]+b[i][j];
}
}
printf("\n\nAddition of two matrices is:");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
printf("%d\t",c[i][j]);
}
}
getch();
}
Q4. Write a program to read two strings and find whether they are equal Or not.
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char st1[20],st2[20];
printf(“enter string 1”);
scanf(“%s”,st1);
printf(“enter second string”);
scanf(“%s”,st2);
if(strcmp(st1,st2)==0)
printf(“\nboth strings are equal”);
else
printf(“\nstrings are not equal”);
}
Q5. Write a program to print Fibonacci series upto given number entered by user
#include<stdio.h>
Int main()
Int n1=0,n2=1,n3,I,number;
Scanf(“%d”,&number);
N3=n1+n2;
Printf(“ %d”,n3);
N1=n2;
N2=n3;
Return 0;
}
Comment/Suggestions about team work/leadership/inter-
personal Communication (If Any):
( )