Premier University
Department of Electrical and Electronic Engineering
Course Title :Basic Computer Programming; Course Code :CSE1204
TITLE: FINDING THE SMALLEST NUMBER IN A LIST.
PRESENTED BY:
Supervised By SURAIYA JANNAT
(0222410005131009)
TUTON CHANDRA MALLICK
Associate Professor TONMOY SHARMA
Department of EEE (0222410005131015)
Premier University
DATE: 25.01.2025
INTRODUCTION AND PROBLEM STATEMENT
INTRODUCTION:
Create a program that will find the smallest number among n numbers given by
the user.
PROBLEM STATEMENT:
The user will input some numbers. The program will find the smallest number
among those numbers and output it
ALGORITHM :
STEP 1: First some initial messages are printed which send a message
to the user that the program will find the smallest number.
STEP 2: The user is asked to input n numbers, which will tell how
many numbers to work on. n integers are taken from the user and
stored in an array.
STEP 3: A loop is used, which allows the user to input each number.
Each time the loop is executed, the user inputs a number, which is
stored in the array.
STEP 4: Assume that the first element is the smallest. .Then the rest
of the numbers are compared using a for loop. If any number is
smaller than smallest, then smallest is updated.
STEP 5: After completing the loop, print the smallest
number.
FIG: CODING OF FIND THE SMALLEST NUMBER
FIG: OUTPUT OF FIND THE SMALLEST NUMBER
Conclusion:
The program works successfully and finds the smallest number. It show
ability to convert algorithms into programming code. In Future we can
Improve the program more, such as handling different data types or
larger inputs. Apply the same method to more complex problems.
THANK YOU