it allows the user to choose one item from the list
Answers
Answered by
5
import java.util.*;
class whatever
{
void disp()
{
int a;
System.out.println("item 1");
System.out.println("ITEM 2");
......so on...
Scanner ob.new Scanner (System.in);
System.out.println("choose one: (type the no. of the item you want)");
a=ob.nextInt;
if(a==1)
Sopln("item 1");
else if(a==2)
Sopln("item 2");
.........so on...
}
}
the program is in java, u didnt specify the language so, i gave in java
Answered by
0
- Answer:
- java
Explanation:
lplz
- follow me plz plz
Similar questions