Write a C program to find both the largest and smallest number in list of integers.
#include <stdio.h> #include <conio.h> void main() { int i,n,small=0,large=0; int a[30]; clrscr(); printf("\n Enter size of the array:"); scanf("%d",&n); printf("\n Enter values in array elements:"); for(i=0;i<n;i++) { scanf("%d",&a[i]); } small = a[0]; for(i=0;i<n;i++) { if(small > a[i]) small = a[i]; } printf("\n The smallest element in given array is %d",small); large=0; for(i=0;i<n;i++) { if(large < a[i]) large = a[i]; } printf("\n The largest element in given array is %d",large); printf("\n :End of the Main Program:"); getch(); }
Discuss about Staffing
What is a minimum spanning tree ? Describe Huffman’s Algorithm.
What are the methodology for dialog design?
Explain the LOC, Function point and Feature point?
Explain the concept of frequency reuse in cellular systems.
Define packet switching and circuit switching. What is MANET?