Write a program that reads a list of integers into a list as long as the integers are greater than zero, then outputs the smallest and largest integers in the list. Ex: If the input is: 10 5 3 21 2 -6 the output is: 2 and 21 You can assume that the list of integers will have at least 2 values.
this is a problem that I don't understand I need help
Introduction
Integer:
An integer is a whole number that does not have a fractional part, which means it is a number that can be written without a decimal or a fraction. Integers can be positive, negative, or zero, but they do not include any fractional or decimal parts. Integers are a fundamental data type in programming and are used for a wide range of operations, such as counting, indexing, and performing arithmetic operations.
In programming, integers are typically represented using a specific number of bits, and the range of values that can be represented by an integer type depends on the number of bits used to store it. For example, in Python, the int
data type can represent integers of arbitrary size, while in some other programming languages, such as C or Java, the range of representable integers is limited by the number of bits used to store them.
In summary, an integer is a whole number with no fractional or decimal part, and it is a fundamental data type in programming used for a variety of operations.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images