commit 7156dbba8d5d11ff3091e7e8bacef3e9fbed581b
parent 87c7aedfe55976eb80625acf5c192ba0f02561d3
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Wed, 3 Sep 2025 14:19:24 +0530
Delete practice-c/findlargestsmallest.c
Diffstat:
1 file changed, 0 insertions(+), 40 deletions(-)
diff --git a/practice-c/findlargestsmallest.c b/practice-c/findlargestsmallest.c
@@ -1,40 +0,0 @@
-#include<stdio.h>
-
-int main() {
- int input_count, inp, max, min, i;
- printf("\nHow many input do you want to add to the array : ");
- scanf("%d",&input_count);
-
- if (input_count <= 0) {
- printf("\nArray should have atleast 1 value.");
- return 0;
- }
-
- printf("\n");
- int values[input_count];
-
- for (i = 0; i < input_count; i++) {
- printf("Please enter value for position %d : ", i+1);
- scanf("%d",&inp);
-
- if (inp < 0) {
- printf("\nPlease enter a non negetive integer.");
- return 0;
- }
-
- values[i] = inp;
- }
-
- max = values[0];
- min = values[0];
-
- for (i = 0; i < input_count; i++) {
- if (max < values[i]) max = values[i];
- if (min > values[i]) min = values[i];
- }
-
- printf("\nMaximum : %d",max);
- printf("\nMinimum : %d",min);
- return 0;
-}
-