I am introducing myself as a beginner in Java.I have just made a program.My idea is to get an output depending on the ranges.So here is the program:
public static void main(String args)
Scanner inputa=new Scanner(System.in);
if(b > 0 && b < 20);
The code is perfect.I had doubts in it which were solved by this site.So what I want to do is get an output as 5 if the input is between 1-20.here is an example what I want to do:Suppose today I input it a number like 7 the answer should be 5.The next day I will input another no. like 10 the input will be 5 too.I want it to save and add the numbers automatically.So the first and second input's answer is 5 so I want the program to add up those two numbers automatically without editing the file everyday.Is there any way?I am just a beginner and don't understand much of it.
Also I want to design a statement like to assign multiple inputs as new scanners.Like Scanner a,b,c=new Scanner(System.in);