Answer:
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter a number: ");
int userVal = input.nextInt();
String aString;
if(userVal < 0)
aString = "negative";
else
aString = "non-negative";
System.out.println(aString);
}
}
Explanation:
Ask the user to enter a number and set it to userVal
Check the value of userVal. If it is smaller than 0, set the string as "negative". If it is not, set it as "non-negative"
Print the string
Answer:
Program
Explanation:
Program is like a set of instructions that helps hardware process data into information.
Every hardware needs a program to process data into information.
For example take the example of a data processing software like MS Excel.
You open a spreadsheet and enter some data into your sheet. and then ask the program to do some calculations with this data and give you output results. The spreadsheet software does this processing in the background for you and provides you the results.
Without program a hardware doesn't know what to do with the data. Therefore, a program is like a instruction set that guides the hardware what to do with the data.
Note: The terms software and program are usually used together but there is a difference between software and program
A software is a generalized term and program is more like a specific term.
software can be made up of several different programs which performs many different tasks. On the other hand, a program only carry out a specific task or set of instructions.
Another important advantage would be that the information you stored is portable and you may thus carry the CD right inside your pocket. Whenever you need it, you can retrieve it in a minute.
Closing entries are entries<span> made at the end of an accounting period to zero out all temporary accounts. The balances are transferred to permanent accounts.
After the closing entries have been posted:
A. the temporary accounts are zeroed out
Revenues and expenses are transferred to the income Summary Account and then Income Summary is closed to Retained earnings.</span>