SEARCH MAXIMUM AND MINIMUM ELEMENT IN AN INTEGER ARRAY

/*PROGRAM TO SEARCH MAXIMUM AND MINIMUM ELEMENT IN AN INTEGER ARRAY*/ #include<stdio.h> #include<conio.h> void main() { int i,j,s,l,a[10],loc=0; clrscr(); printf(“Enter any ten elements in the array:\n”); for(i=0;i<10;i++) scanf(“%d”,&a[i]); printf(“Elements in …

PROGRAM TO COPY AN ARRAY INTO ANOTHER ARRAY

/*PROGRAM TO COPY AN ARRAY INTO ANOTHER ARRAY*/ #include<stdio.h> #include<conio.h> void main() { int i,a[5],b[5]; clrscr(); printf(“Enter any five elements in the array:\n”); for(i=0;i<5;i++) scanf(“%d”,&a[i]); printf(“Elements of original array are:\n” …

PROGRAM TO DISPLAY SUM OF SERIES

/*PRORAM TO DISPLAY SUM OF SERIES*/ #include<stdio.h> #include<conio.h> void main() { int n,sum=0,i,j,temp=1; clrscr(); printf(“Enter the range of series: “); scanf(“%d”,&n); if(n<1) printf(“Range must be greater than zero”); else { …

WAP TO DISPLAY A SERIES AND ITS SUM

/*WAP TO DISPLAY A SERIES AND ITS SUM*/ #include<stdio.h> #include<conio.h> void main() { int n,i; float j,inv,sum=0; clrscr(); printf(“Enter the range: “); scanf(“%d”,&n); printf(“Series upto %d and its sum is: …

PROGRAM TO DISPLAY A SERIES AND FIND ITS SUM

/*PROGRAM TO DISPLAY A SERIES AND FIND ITS SUM*/ #include<stdio.h> #include<conio.h> void main() { int i,j,n,sum=0; clrscr(); printf(“Enter the limit of series: “); scanf(“%d”,&n); printf(“Series and its sum is: \n”); …

PROGRAM TO PRINT A PATTERN STARTING FROM Nth ROW

/*PROGRAM TO PRINT A PATTERN STARTING FROM Nth ROW*/ #include<stdio.h> #include<conio.h> void main() { int i,j,temp,n,a; clrscr(); printf(“Enter the value for nth row: “); scanf(“%d”,&a); n=(a*2)-1; for(i=1;i<=a;i++) { temp=1; for(j=1;j<=n;j++) …

PROGRAM TO PRINT A PATTERN UPTO N ROWS

/*PROGRAM TO PRINT A PATTERN UPTO N ROWS*/ #include<stdio.h> #include<conio.h> void main() { int i,j,temp,n; clrscr(); printf(“Enter the limit of rows: “); scanf(“%d”,&n); temp=1; for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { printf(“%d\t”,temp); temp++; …

PROGRAM TO PRINT A STAR SEQUENCE 3

/*PROGRAM TO PRINT A STAR SEQUENCE 3*/ #include<stdio.h> #include<conio.h> void main() { int i,j,k,temp; clrscr(); printf(“Press any key to display the sequence of stars: \n”); getch(); temp=1; for(i=1;i<=3;i++) { for(j=3-i;j>=1;j–) …

PROGRAM TO PRINT STAR SEQUENCE2

/*PROGRAM TO PRINT STAR SEQUENCE2*/ #include<stdio.h> #include<conio.h> void main() { int i,j,k; clrscr(); printf(“Press any key to display the sequence of stars: \n”); getch(); for(i=1;i<=4;i++) { for(j=4-i;j>0;j–) printf(” “); for(k=1;k<=i;k++) …