- #include<stdio.h>
- # include<conio.h>
- void main()
- {
- int a[100],i,n,max,min;
- clrscr();
- printf("How many elements in the array : ");
- scanf("%d",&n);
- printf("Enter the elements : \n");
- for(i=0;i<=n-1;i++)
- {
- scanf("%d",&a[i]);
- }
- max = a[0];
- min = a[0];
- for(i=1;i<=n-1;i++)
- {
- if(max<a[i])
- max = a[i];
- if(min>a[i])
- min = a[i];
- }
- printf("maximum element in the array is :%d\n ",max);
- printf("minimum element in the array is : %d\n",min);
- getch();
- }
Monday 12 December 2016
How to Find Maximum & Minimum Element in the Array Program in C
Subscribe to:
Post Comments (Atom)
Upload valid file in C#
protected bool CheckFileExtandLength(HttpPostedFile HtmlDocFile) { try { Dictionary<string, byte[]>...
-
CREATE TAblE #temp ( T_Name VARCHAR(50), T_Times BIGINT ) INSERT INTO #temp(T_Name,T_Times) VALUES ('ASHISH',4) IN...
-
Step 1: Open URL: https://portal.azure.com/#home Step2 : Click Manage Azure Active Director Step3: Click Enterprise Application Step 4: Ne...
-
Injection Injection flaws, such as SQL injection, LDAP injection, and CRLF injection, occur when an attacker sends untrusted data to an ...
No comments:
Post a Comment