Write a program that determines whether a number entered from the keyboard is negative
July 29, 2021 | education|
Write a program that determines whether a number entered from the keyboard is negative, display a message about this on the screen.
var n: integer; // introduce a variable of integer type
write (‘enter a number’); // enter a number from the keyboard
if n <0 then write (‘number’, n, ‘is negative’) else write (‘number’, n, ‘is not negative’);
One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.