Previous Next
0 / 21
Module DEMO-32-106DEMO-C-32

Find Minimum Element

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a C program to find the minimum element in a 1D array.

Example

Input:

5 10 5 30 9 20

Output:

5

Constraints

1 <= n <= 100

Input Format

n followed by elements.

Output Format

Minimum value.

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
5
10 5 30 9 20
5
Min is 5.
Sample #2
Public sample
3
-1 -5 -2
-5
Min is -5.
Sample #3
Public sample
1
7
7
Single item.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings