when is a scanner used for input
Answers
Answered by
7
for entering a Hard copy (a sheet of printed information) in PC or sending an email by making it a soft copy.
Answered by
3
scanner is used for input when we make program in java.
for ex-
importjava. util. *;
class add
{
void main()
{
scanner SC=new scanner (system.in);
int r =SC.next int();
int s=SC.next int ();
int X= r*s;
system.out .print (r);
}
}
for ex-
importjava. util. *;
class add
{
void main()
{
scanner SC=new scanner (system.in);
int r =SC.next int();
int s=SC.next int ();
int X= r*s;
system.out .print (r);
}
}
Similar questions