Laplace transforms pdf

CLICK THE LINK BELOW TO DOWNLOAD LAPLACE TRANSFORMS IMPORTANT FORMULAS IN THE FORM OF PDF

CLICK HERE

Saturday, 23 July 2016

C program to find the first largest and second largest elements in an array

/*Program to find the first and second largest number in the given array*/

#include<stdio.h>
void main()
{
int a[100];
int n,f=0,s=0,i;
printf("enter the number of elements in the array\n");
scanf("%d",&n);
printf(" \n enter the elements and press enter\n");
for(i=0;(i<n);i++)
   {
     scanf("%d",&a[i]);
  if(a[i]>f)
          {
           s=f;
           f=a[i];
           }
     if((a[i]>s)&&(a[i]<f))
        s=a[i];
    }
printf("%d is the first largest number \n",f); printf("%d is the second largest number \n",s);
}

No comments:

Post a Comment